[TYPO3-english] Tx_News Templates
Marvin Anselm
marvin-anselm at web.de
Tue Feb 18 19:24:43 CET 2014
Hey Guys,
on my Typo3-Installation I installed the extension "news" (tx_news) and now I want to load for top-news a special Template (Top) and for the normal news a special Partial (BDKJ-Chor) . My list.html looks like this:
********************CODE BEGINS***************
{namespace n=Tx_News_ViewHelpers}
<f:layout name="General" />
<!--
=====================
Templates/News/List.html
-->
<f:section name="content">
<f:if condition="{news}">
<f:then>
<f:if condition="{newsItem.istopnews}">
<f:then>
<f:render partial="List/Top" arguments="{newsItem: newsItem.istopnews, settings:settings}" />
</f:then>
<f:else>
<f:for each="{news}" as="newsItem">
<f:render partial="List/BDKJ-Chor" arguments="{newsItem: newsItem, settings:settings}" />
</f:for>
</f:else>
</f:if>
</f:then>
<f:else>
<div class="no-news-found">
f:translate key="list_nonewsfound" />
</div>
</f:else>
</f:if>
</f:section>
********************CODE ENDS****************
My Problem is, that BDKJ-Chor is loaded, but for EVERY top news and news.
Maybe you can tell me, where I failed and why he don't understand the if-condition for topnews?
On more little Problem:
In the Code on the generated Page with the news it says in html-comments "Partials/Item.html" for each news. But this file doesn't exist anymore (because of the special Partials). Is this normal or do I have there one more problem?
Thanks for your help,
Marvin
More information about the TYPO3-english
mailing list