[TYPO3-mvc] Iterating 1, 2, 3, 1, 2, 3, ... in f:for Viewhelper possible?
Josef Florian Glatz
typo3 at josdesign.at
Wed Jan 11 23:29:08 CET 2012
Hy Claus!!!!! :-O
Ahhh, the cycle viewhelper!!!! Thx Claus for your hint!!!!
cheers,
jousch
Am 11.01.2012 23:08, schrieb Claus Due:
> Hi Jousch,
>
> Will this do?
>
> http://fedext.net/fluid-viewhelpers/structural/cycle/
>
> It does exactly what you need; alternates between any set number of CSS classes inside an iteration :)
>
> Cheers,
> Claus
>
> On Jan 11, 2012, at 10:51 PM, Josef Florian Glatz wrote:
>
>> Hello,
>>
>> I want an output of newsitems with ext:news (georg ringer) and I'm searching for a solution to solve this:
>>
>> <div class="left">Newsitem A</div>
>> <div class="center">Newsitem B</div>
>> <div class="right">Newsitem C</div>
>> <div class="left">Newsitem D</div>
>> <div class="center">Newsitem E</div>
>> <div class="right">Newsitem F</div>
>>
>> My current HTML/Fluid Template looks like:
>>
>> <n:widget.paginate objects="{news}" as="paginatedNews" configuration="{settings.list.paginate}">
>> <f:for each="{paginatedNews}" as="newsItem" iteration="iterator">
>> <div class="item{iterator}">
>> <strong>iterator: {iterator.cycle} // newsUID: {newsItem.uid}</strong>
>> <f:render partial="List/Item" arguments="{newsItem: newsItem, settings:settings, className:className, view:'list'}"/>
>> </div>
>> </f:for>
>> </n:widget.paginate>
>>
>>
>> Any suggestions how I can solve this?
>>
>> thx in advance!
>>
>>
>>
>> --
>> Regards,
>> Josef Florian Glatz
>> http://typo3blog.at
>> _______________________________________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>
--
Regards,
Josef Florian Glatz
http://typo3blog.at
More information about the TYPO3-project-typo3v4mvc
mailing list