[TYPO3] Problem implementing nested menus in TypoScript

Ricardo Pereira ricardo at tdwg.org
Tue Oct 3 19:54:05 CEST 2006


Peter Klein wrote:
>>    I'm trying to implement the menu below in Typo3 but I'm having trouble 
>> coming up with the right TypoScript for it.
>>
>>    The main problems are that:
>>
>> 1) I need to create 2 divs for each menu item that has subitems, one of 
>> class "button" and the other "menu".
>>     
>
> 1) What's the problem?
>   
Maybe just lazyness (from my part). I RTM and here's the TS I came up with:

temp.tempMenu {
    expAll = 1
    NO.allWrap = <div class="button">|</div>
    NO.noBlur = 1
   
    IFSUB = 1
    IFSUB.subst_elementUid = 1
    IFSUB.doNotLinkIt = 1
    IFSUB.allWrap (
    <div id="page{elementUid}" class="button">
        <span class="buttonlabel" onclick="toggleMenu(this)" 
onmouseover="buttonOver(this)" onmouseout="buttonOff(this)">
            <img 
src="fileadmin/template/main/tdwg01/animTree/menuicon.gif" title="click 
to toggle menu" alt="">
            |
        </span>
    </div>
    <div id="page{elementUid}Menu" class="menu">
    )

    IFSUB.wrapItemAndSub (
    |
    </div>
    )
}

Many thanks for your help!!!

Cheers,

Ricardo





More information about the TYPO3-english mailing list