Creating inline, static header or footer navigation for your TYPO3 website is easy.
Just copy and paste the following TypoScript code into your TypoScript template’s Setup section and then call lib.nav.top
as needed into your TemplaVoila or TypoScript page template to create your own static header navigation.
You can adjust what pages show by changing the PIDs in lib.nav.top.special.value
.
lib.nav.top = HMENU lib.nav.top { special = list special.value = 22, 91, 20, 32 1 = TMENU 1 { NO { linkWrap = | | |*||*| | ATagTitle.field = description // title stdWrap.htmlSpecialChars = 1 } CUR < .NO CUR = 1 CUR { doNotLinkIt = 1 stdWrap.wrap = <span id="current">|</span> } } } # search box appending temp.lib.nav.top < lib.nav.top lib.nav.top > lib.nav.top = COA lib.nav.top { 10 < temp.lib.nav.top 20 < lib.static.search }
What About My Footer?
Instead of copying and pasting all of lib.nav.top
again into a lib.nav.footer
, you can reuse lib.nav.top
with the power of TypoScript.
lib.nav.footer < lib.nav.top lib.nav.footer.special.value = 39, 40, 41
Related Links
- HMENU
- TMENU
- TMENUITEM
- lib.nav.top and search box
- Hover over the page icon for its PID
- lib.nav.top TypoScript