Extension tx_news: Use different templates
This is not activated by default, so these must first be defined.
Procedure
In the root page of the Typo3 site, we need to call up the page properties by clicking on "Page" - "Root page" and the pencil.
In the Resources tab we find the "Page-TScofig". There we can define which items in the drop-down menu in the template of the tx_news plug-in can be opened and selected.
This is where it is copied:
If we now open the plugin, we see the relevant selection, but this has no effect yet, as tx_news still has no idea which modified resource it should access.
Where are the templates defined?
If we deviate from the normal template of tx_news, we define in the constants of the main Typo3 template where the fluid templates are stored.
plugin.tx_news.settings.cssFile = fileadmin/news/Resources/Public/Css/news-basic.css
plugin.tx_news.view.layoutRootPath = fileadmin/news/Resources/Private/Layouts/
plugin.tx_news.view.partialRootPath = fileadmin/news/Resources/Private/Partials/
plugin.tx_news.view.templateRootPath = fileadmin/news/Resources/Private/Templates/
Within these files, the various areas that are to be customised are now marked using Typoscript and a condition.
docs.typo3.org/typo3cms/extensions/news/2.2.1/Main/Templating/Additional/Index.html
E.g. as here in the path fileadmin/news/Resources/Private/Partials/List/Item.html
<f:if condition="{settings.templateLayout} == 1">
<f:then>
Typoscript für News Aussehen 1
</f:then>
</f:if>
<f:if condition="{settings.templateLayout} == 2">
<f:then>
Typoscript für News Aussehen 2
</f:then>
</f:if>
<f:if condition="{settings.templateLayout} == 3">
<f:then>
Typoscript für News Aussehen 3
</f:then>
</f:if>