[TYPO3-english] display category and all items listed under that category

Xavier Perseguers xavier at typo3.org
Tue Jun 18 15:55:00 CEST 2013


Hi,

Have a look at the GroupedFor viewhelper.

Regards
Xavier

Muriel le Pair wrote:
> Hi,
> 
> I would like to output a simple menu that displays the category and all
> items listed under that category. But somehow I can't figure out how to
> do this in extbase / fluid.
> 
> So basically something like this:
> category1
> - title 1
> - title 2
> - title 3
> 
> category 2
> - title 4
> - title 5
> etc
> 
> So for instance I was wondering if it is possible to store a value so
> that I could do something like this:
> 
> <f:for each="{itemlist}" as="item">
>    <f:if condition="{item.category} != {currentcategory}">
>         <h2>{item.category}</h2>
>     currentcategory = {item.category}
>    </f:if>
>     
>    {item.title}<br>
> </f:for>
> 
> -- 
> kind regards,
> 
> Muriel le Pair

-- 
Xavier Perseguers
Release Manager TYPO3 4.6

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org



More information about the TYPO3-english mailing list