We Recommend

Building Websites with TYPO3 Building Websites with TYPO3
Follow a clear path through the power and complexity of TYPO3 to get started, and build your own TYPO3 website This book is a fast paced tutorial to creating a website using TYPO3. If you have never used TYPO3, or even any web content management system before, then you need not look further than this book as it walks you through each step to create your own TYPO3 site.


Posted By

simongrout on 06/11/09


Tagged

menu typoscript navigation


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

rob-ot


A simple navigation menu in typoscript with different classes on the first and last elements


Published in: TYPO3 


URL: http://3ev.com

Creates a list of links from a folder of TYPO3 content. The first and last item in the list can be given a different HTML class; this allows you to style them differently. For example, you may want dividers after all of your menu items except for the last one.

This a simple piece of typoscript, but it took me a while to track down the right answer.

special.value is the ID of the page or folder you want want to create a menu from.

  1. lib.navmenu = HMENU
  2. lib.navmenu {
  3. special = directory
  4. special.value = 1
  5. 1 = TMENU
  6. 1.NO {
  7. linkWrap = <li class="first">|</li>|*|<li>|</li>|*|<li class="last">|</li>
  8. }
  9. }

Report this snippet 

You need to login to post a comment.