[TYPO3-english] TYPO3 6.2: Render category rootline when using sys_category

Bert Hiddink [BENDOO e-work solutions] hiddink at bendoo.nl
Fri Nov 14 09:49:00 CET 2014


Hello,

I noticed that if I use this on News->detail, it only gives me the 
root-category, not the complete root-line, that is, "root-cat", instead 
of "root-cat->sub-cat, sub-subcat"...

Any idea what is going wrong here?

Thanks in advance!

Regards,
Bert

<f:if condition="{category:newsItem.firstCategory}">
         <ul class="category-breadcrumb">
                 <f:render section="categoryBreadcrumb" 
arguments="{category:newsItem.firstCategory}" />
         </ul>
</f:if>

<f:section name="categoryBreadcrumb">
         <f:if condition="{category}">
                 <f:if condition="{category.parentCategory}">
                         <f:render section="categoryBreadcrumb" 
arguments="{category:category.parentCategory}" />
                 </f:if>
                 <li>{category.title}</li>
         </f:if>
</f:section>




On 13-11-14 20:33, Bert Hiddink [BENDOO e-work solutions] wrote:
>
> "If you want to show not only the title of a single category which is
> related to the news item but the complete category rootline use this
> snippets.
>
> <f:if condition="{category:newsItem.firstCategory}">
>          <ul class="category-breadcrumb">
>                  <f:render section="categoryBreadcrumb"
> arguments="{category:newsItem.firstCategory}" />
>          </ul>
> </f:if>
>
> and
>
> <f:section name="categoryBreadcrumb">
>          <f:if condition="{category}">
>                  <f:if condition="{category.parentCategory}">
>                          <f:render section="categoryBreadcrumb"
> arguments="{category:category.parentCategory}" />
>                  </f:if>
>                  <li>{category.title}</li>
>          </f:if>
> </f:section>"



More information about the TYPO3-english mailing list