[TYPO3-english] fluid template groupBy with multiple values

Muriel le Pair typo3 at strangefruit.nl
Mon Jul 29 16:22:10 CEST 2013


Hi,

I'm struggling with a fluid template.

Is it possible to output 2 values when using groupBy?

I would like to output a list like this:

category
- item 1
- item 2

category 2
- item 3

etc

Each category should link to a page to display only items from that 
category and each item to the detail page of the item.

category.category contains the name of the category.
category.uid contains the value needed for the links.

So I tried this (does not work):

<f:groupedFor each="{plist}" as="allitems" groupBy="category.category" 
groupKey="groupcategorie">

     <!-- category -->
     <f:link.action action="listCat" pageUid="{settings.overzichtPid}" 
arguments="{category:allitems.category.uid}">
          <h3>{groupcategorie}</h3>
     </f:link.action>
     <!-- category end -->

     <ul>
       <f:for each="{allitems}" as="item" key="label">
        	<!-- item -->				
          <li>
        		<f:link.action action="show" pageUid="{settings.detailPid}" 
arguments="{portfolio : item}">
             	   {item.titel}
             	</f:link.action>
          </li>
         <!-- item end -->
       </f:for>
    </ul>

</f:groupedFor>

--
kind regards,

Muriel le Pair


More information about the TYPO3-english mailing list