[TYPO3-english] Fluid, iterate through tt_content elements in colPos on a page

Vincent Mans vincent at vibis.nl
Mon May 1 20:30:46 CEST 2017


Hi folks,

A fluid template question for 8.7.1.

Is there a way to do a for each with iterator on a cObject typo3objectpath
lib.content?

I want to know the number of the tt_content elements inside a colPos on a
page, and for instance add a class to the 4th record. Or count the
tt_content elements inside a colPos and based on the number, add a
bootstrap col- width.

No need for a full working example, just a step-up. Been looking for a
solution almost a day now.

For menus and news, and such cases, I have it covered. It's just for
regular content. So perhaps I'm overlooking something.


Many thanks / Danke vielmals / Merci beaucoup,

Vincent


More information about the TYPO3-english mailing list