You are here: All articles » Programming » Typo3, exclude rootline menu on first level pages
-
Typo3, exclude rootline menu on first level pages
written: 15 years ago category: Programming Previous Next
On the root or first level page you probably want to hide a so called breadcrumb menu, as it would be a single word, identically with the page title, looking like a repetition of the page title. All "deeper" page levels should indeed include the complete path.
There is a HMENU.minItems property which looked pretty like what I needed. But that created a dummy item with three dots for missing level items, not what I wanted. So, the trick is to use a conditional block, where the first one is executed on page level 0 and 1, and the second one for all deeper levels:
[treeLevel = 0,1]
# No breadcrumb on root or first level pages
mainPage.10.marks {
BREADCRUMB = TEXT
BREADCRUMB.value =
}
[else]
mainPage.10.marks {
BREADCRUMB = HMENU
BREADCRUMB {
wrap = <p>|</p>
special = rootline
# No item at all for the root page, so we start at level 1
special.range = 1|-1
1 = TMENU
1.NO = 1
1.NO.allWrap = | »
1.CUR = 1
1.CUR.doNotLinkIt = 1
}
}
[end]http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/4/1/
Leave a comment