[TYPO3-ttnews] Ext:news - display news title in category menu

Thomas Meixner tom.meixner at gmail.com
Mon Jun 4 12:33:33 CEST 2012


Hello,

I have a 3 level menu for a project where I started using news. The first 
two levels are only categories. I want to display the news title as the 
third level in the category menu. 

The simplest way I saw was to modify the category controller to additionally 
provide the news to the view. 
I now loop through each news to check whether it's part of the category 
which is being rendered. The View is a inherently bad place to do this kind 
of filtering and consequently I have a performance problem. Page generation 
takes about a minute if not cached...

...
<f:for each="{newsItem.categories}" as="newsCat">
	<f:if condition="{newsCat.uid} == {category}">
		<f:then>
			<li>
			<n:link newsItem="{newsItem}" settings="{settings}">
				{newsItem.title}
			</n:link>
			</li>
		</f:then>
	</f:if>
</f:for>
...

I already upgraded to TYPO3 v 4.6 which reduces Page rendereing to about 
half the time but what would be the right direction to take here since I 
have two different types of objects and need to combine them together in the 
view.


Thanks in advance for any help.

PS: This extension is really fun to work with, thanks for all the great 
work.


More information about the TYPO3-project-tt-news mailing list