Posted By

gerhardsletten on 12/08/07


Tagged

typo3


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

heinz1959
roland_kainbacher


2 level menu in typo3


 / Published in: Other
 

Put this in your template.

  1. # ------------------------
  2. # Meny level 1
  3. # ------------------------
  4.  
  5. # Menu 1 cObject
  6. lib.mainMenu = HMENU
  7. lib.mainMenu.1.wrap = <ul>|</ul>
  8. # First level menu-object, textual
  9. lib.mainMenu.1 = TMENU
  10.  
  11. lib.mainMenu.1 {
  12. expAll = 0
  13. # Normal state properties
  14. NO.allWrap = <li> | </li>
  15. NO.stdWrap.htmlSpecialChars = 1
  16. # Enable active state and set properties:
  17. ACT = 1
  18. ACT.stdWrap.htmlSpecialChars = 1
  19. ACT.allWrap = <li class="selected"> | </li>
  20. }
  21. # Second level menu-object, textual
  22. lib.mainMenu.2 = TMENU
  23. lib.mainMenu.2.wrap = <ul>|</ul>
  24. lib.mainMenu.2 {
  25. # Normal state properties
  26. NO.allWrap = <li> | </li>
  27. NO.stdWrap.htmlSpecialChars = 1
  28. # Enable active state and set properties:
  29. ACT = 1
  30. ACT.stdWrap.htmlSpecialChars = 1
  31. ACT.allWrap = <li class="selected"> | </li>
  32. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: sridharkalaibala on December 21, 2011

Thank you very much for this post. You saved my time lot.

i need one help. How can i get all menus? i need drop down menu so all sub menus should show every time not whenever visit individual parent menus.

Thanks, Sridhar

Posted By: tonihelpsyou on August 25, 2012

For Sridhar and others,

To have all sub menus always shown just change line 12 expAll from 0 to 1. If you want this behavior only in sub menus then add the line "expAll = 1" at the level you want.

Cheers

You need to login to post a comment.