Posted By

simongrout on 06/11/09


Tagged

menu typoscript navigation


Versions (?)

Who likes this?

1 person have 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.