This example how to make a menu as an unordered list, by enabling ACT (active) and CUR (current) it sets the <li> tags with attributes class=”active” and id=”current” respectively. The current page is wrapped in <span> and not linked.
The above example can be extended using field:title and field:subtitle, if a specific id for styling is needed or if some information should be placed as value in the title attribute.
Related Articles:
- TYPO3: XHTML Valid 3 Level Menu in Typoscript
- TYPO3: How to make a path/breadcrumb in typoscript
- TYPO3: tt_news LIST and SINGLE at the same page
- TYPO3: Setting XHTML 1.1 DOCTYPE
- TYPO3: Copyright Notice with Automatic Year Update and Secondary Language Support
- TYPO3: Changing the tt_news template markup
- TYPO3/TypoScript: How to add Page Updated Timestamp
Thank you a lot, that helped me to solve a problem that i had with a menu i was working on!
Michael
Thanks so much, this solution worked right out of the box for me. I do wonder if it’s required to first use a hierarchiel menu(HMENU) for the root element and a text menu(TMENU) inside.
The corresponding CSS should be a breeze now!
I was curious if there was a way to apply the id={field:title} to the (li) tag instead of the (a) tag?