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.


  1. ## MainMenu [Begin]
  2. lib.mainMenu = HMENU
  3. lib.mainMenu.entryLevel = 0
  4. lib.mainMenu.wrap = <ul>|</ul>    
  5. lib.mainMenu.1 = TMENU
  6. lib.mainMenu.1 {
  7.         noBlur = 1
  8.         ACT = 1
  9.         CUR = 1
  10. }
  11. lib.mainMenu.1.NO {
  12.         allWrap = <li>|</li>
  13. }
  14. lib.mainMenu.1.ACT {
  15.         allWrap = <li class="active">|</li>
  16. }
  17. lib.mainMenu.1.CUR {
  18.         allWrap = <li id="current"><span>|</span></li>
  19.         doNotLinkIt = 1
  20. }
  21. ## MainMenu [End]

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.

  1. lib.mainMenu.1.NO {
  2.         allWrap = <li>|</li>
  3.         ATagParams.dataWrap = id="{field:title}" title="{field:subtitle}"
  4. }
  5. lib.mainMenu.1.ACT {
  6.         allWrap = <li class="active">|</li>
  7.         ATagParams.dataWrap =  id="{field:title}" title="{field:subtitle}"
  8. }


Related Articles: