.. ================================================== .. FOR YOUR INFORMATION .. -------------------------------------------------- .. -*- coding: utf-8 -*- with BOM. .. include:: ../../../Includes.txt Template selector ================= This entry should help you to use different templates for different (list) views. Using the following Page TsConfig the editor can select the layouts in the news plugin: .. code-block:: typoscript tx_news.templateLayouts { 1 = A custom layout 99 = LLL:fileadmin/somelocallang/locallang.xlf:someTranslation } You can use any number to identify your layout and any label to describe it. Now it is possible to use a condition in the template to change the layouts, and e.g. load a different partial: .. code-block:: html
As you can see in this example a different partial is loaded if the layout 99 is used. Custom Templates by using TypoScript ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You can define a custom TypoScript setting which you can check in the view later on. The TypoScript could look like: .. code-block:: typoscript plugin.tx_news { settings { isLatest = 1 } } And then you can use a condition like this: .. code-block:: html do something if it is set do something if it is not set