[TYPO3] Is there away to keep submenus visble?

StephenBungert stephenbungert at yahoo.de
Thu Sep 25 12:42:37 CEST 2008


I have the following TS for my menu:

### temp.mainNav ###
### ------------ ###

temp.mainNav = HMENU
temp.mainNav {
  # Keep 'Our Products' and 'Article Categories' always open and expanded
  #alwaysActivePIDlist = 202,211
  
  # Main menus (in grey boxes)
  1 = TMENU
  1 {
    NO = 1
    NO {
      allWrap = {$lnBoxStart} | {$lnBoxEnd}
      subst_elementUid = 1
      stdWrap {
        htmlSpecialChars = 1
        field = subtitle // title
      }
    }
    
    ACT < .NO
    ACT.allWrap = {$lnBoxStart} | {$lnBoxEndAct}
    
    CUR < .ACT
    CUR.doNotLinkIt = 1
  }
  
  # Submenus (list items)
  2 < .1
  2 {
    wrap = <ul id="{elementUid}" id="leftNav" class="lvl2"> | </ul>
    
    #NO.additionalParams.field = pid
    #NO.additionalParams.wrap = &section=| 
    NO.allWrap = <li id="lnItem" class="mainNav2 no"> | </li>
    ACT.allWrap = <li id="lnItem" class="mainNav2 act"> | </li>
    CUR.allWrap = <li id="lnItem" class="mainNav2 cur"> | </li>
    ACT.doNotLinkIt = 1
  }
}



There are 4 level 1 pages and any number of level 2 (sub pages). The level
one pages are wrapped in a box, they are really just menu headings, but so
that the editors can add as many sub-pages as they like and rearrange them.
I made them pages.

The designer wants an arrow on each lvl 1that shows what will happen if the
menu is clicked on. I managed to do that, the arrow points when there level
one menu is closed, and points up when opened. Now they want the ability for
people to be able to open the menus and close them at will and have these
states persist from page to page.

I got it working with javascript and cookies, but the update by the
javascript was visible after the page loads. I'm sure this won't be
acceptable. Is there away for TYPO3 to do this? I thought about additional
params that could be used with each lvl 2 page. I managed to add the parent
page (lvl 1), but this didn't help as there was no way to tell what other
level pages were open.

Has anyone else had to do this? What solution, if any, did you find?

-----
-- 
Stephen Bungert
-- 
View this message in context: http://www.nabble.com/Is-there-away-to-keep-submenus-visble--tp19667094p19667094.html
Sent from the TYPO3 English mailing list archive at Nabble.com.



More information about the TYPO3-english mailing list