[TYPO3-english] TYPO3 6.2: Render category rootline when using sys_category
Bert Hiddink [BENDOO e-work solutions]
hiddink at bendoo.nl
Thu Nov 13 20:33:27 CET 2014
Hello,
I found this snippet for rendering a category rootline (see below).
However, is there also a way to have this done by plain TS, based on a
GPvar?
That is, if GP:cat=123, show me the parent and grandparent as a category
rootline:
You are here: grandparent > parent > child (123)
Any ideas?
Thanks in advance!
Regards,
Bert
"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