[TYPO3] TMENU_LAYER relativeToTriggerItem

Cyrill Helg linux at solnet.ch
Sun Apr 15 19:45:24 CEST 2007


Am Donnerstag, 12. April 2007 schrieb Bas van der Togt:
> Hello list,
>
> I build a TMENU_LAYER menu but the submenu is aligning at the left.
> I want to show the submenu under the related item.
> This is possible with "relativeToTriggerItem" right? But unfortunately
> it's not working. Can somebody help me..?
>
> Example: http://87.249.105.43/~sust01/index.php?id=11
>
> cheers,
> Bas
>
> Setup:
> # Menu
> temp.Menu = HMENU
> temp.Menu.special = list
> temp.Menu.special.value = 11,10,9,8,7,6,5
> temp.Menu.1 = TMENU_LAYERS
> temp.Menu.1 {
>    #xPosOffset = 100
>    #lockPosition = x
>    #lockPosition_adjust = 1
>    expAll = 1
>    #leftOffset = 0
>    topOffset = 100
>    relativeToTriggerItem = 1
>    hideMenuWhenNotOver = 1
>    hideMenuTimer = 750
>    displayActiveOnLoad = 0
>    freezeMouseover = 1
> }
> temp.Menu.1.NO {
>    allWrap = <div class="button-b{elementUid}">|</div>
>    subst_elementUid = 1
>    ATagParams = class="button-text-no"
> }
> temp.Menu.1.ACT = 1
> temp.Menu.1.ACT {
>    allWrap = <div class="button-b{elementUid}">|</div>
>    subst_elementUid = 1
>    ATagParams = class="button-text-act"
> }
>
> # Submenu
> temp.Menu.2 = TMENU_LAYERS
> temp.Menu.2.wrap = <div id="submenu">|</div>
> temp.Menu.2.expAll = 1
> temp.Menu.2.NO {
>    allWrap = <div class="submenu">|</div>
>    ATagParams = class="submenu-text-no"
> }
> temp.Menu.2.ACT = 1
> temp.Menu.2.ACT {
>    allWrap = <div class="submenu">|</div>
>    ATagParams = class="submenu-text-act"
> }
>
> HTML:
> <div id="menu">
>    <div class="logo"><img src="fileadmin/templates/images/logo.jpg"
> height="100" width="228" alt="ATMOSPHERE" /></div>
>    ###MENU###
> </div>
> _______________________________________________

You need something like:

ib.mainMenu = HMENU
lib.mainMenu {
  1 = TMENU_LAYERS
  1 {
    wrap=<table><tr>|</tr></table>
    lockPosition = y
    hideMenuWhenNotOver = 1
    hideMenuTimer=250
    expAll=1
    leftOffset = 54
    topOffset =150
    relativeToTriggerItem = 1
     
    NO {	
      allWrap=<td>|</td>
      before = &nbsp;
      after = &nbsp; | |*| &nbsp; | |*| &nbsp;

    }
    }

I think the problem in your case is that lockPosition = y is missing.

Good luck




More information about the TYPO3-english mailing list