Sunday 15 May 2011

loops - Typo3 - fluid - for each newsItem.uid -


I am using TypePro 6.0 6.0 and News System 2.0. I have a custom template that is using fluid viewchers, and I'm displaying news from my database based on my categories. So far so good, no problem.

My problem is that I want to loop through all the news records (which are in the table, in the table), so I can use the conditions to filter which show But, till now it seems that my efforts are in vain.

Why is this possible for loops through news categories?

    

But when I try to loop through news item. UID, then it is not working?

  & lt; F: for each = "{newsItem.uid}" = "pub" & gt; & Lt; F: if condition = "{pub} == 5" & gt; {Pub.title} & lt; / F: if & gt; & Lt; / F: for & gt;   

Thank you for your time.

You mess things up (actually @shufala had told it so far).

Each statement for each language allows you to recycle any type of archive through . In this case, every news item can be related to some of the categories , so you can iterate through each of your categories (which are the objects). Something like this is in pseudo-code:

    

The UID is always integer in TYPO3 and it is unique, so it is not possible to iterate through, because the phonetic code looks like this (should fail):

  & lt; F: for every = "1" = "currentObject" & gt; {CurrentObject.property} & lt; / F: for & gt;   

I do not know the news, but I think this will work:

    

While making sure that you do not perform - nested repetition again, maybe you still have everything in the iterative of the default view?

Edit

As you can see newsItem list / item partially news / list -.html view ( Folder templates), so that you are not able to repeat it in partial because you only have one news obj available.

If you want, you need to do some conditional repetition: /typo3conf/ext/news/Resources/Private/Templates/News/List.html

No comments:

Post a Comment