Using TYPO3 v7.6.13 ext:news 5.3.2
I've created two Detail partials to use on a single page, this is the page TS Config:
tx_news.templateLayouts {
11 = HomePage Top Banners
12 = HomePage List
}
Im able to write two conditions so that the appropriate template is used.
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:n="http://typo3.org/ns/GeorgRinger/News/ViewHelpers"
data-namespace-typo3-fluid="true">
<f:layout name="General" />
<!--
=====================
Templates/News/List.html
-->
<f:section name="content">
<!--TYPO3SEARCH_end-->
<f:if condition="{news}">
<f:then>
<f:if condition="{settings.templateLayout} == 11">
<f:then>
<f:for each="{news}" as="newsItem">
<f:render partial="List/homepagetopbanner" arguments="{newsItem: newsItem, settings:settings}"/>
</f:for>
</f:then>
</f:if>
<f:if condition="{settings.templateLayout} == 12">
<f:then>
<f:for each="{news}" as="newsItem">
<f:render partial="List/homepagelist" arguments="{newsItem: newsItem, settings:settings}"/>
</f:for>
</f:then>
</f:if>
</f:then>
<f:else>
<div class="no-news-found">
<f:translate key="list_nonewsfound" />
</div>
</f:else>
</f:if>
<!--TYPO3SEARCH_begin-->
</f:section>
</html>
Im struggling with setting a fallback option, so that the default Detail is used if nothing else is selected.
As I understand, you are not able to write else if statements in this case, is there anyway to set a fallback option?