Typoscript variables in TMENU wrap

If you want to use variables in your typoscript TMENU wrap code, you need to define the input as data. To do this, use ”stdWrap.datawrap” instead of just ”wrap”.

Ex:

lib.submenu {
1 = TMENU
1.stdWrap.dataWrap = <ul><li class="submenu-top">{leveltitle : 1}</li> | </ul>
}

The code above adds the page title of the page on the first level to the top of your submenu.

Complete submenu with page title from parent (level 1) page title at the top:


lib.field_submenu = HMENU
lib.field_submenu.entryLevel = 1
lib.field_submenu.1 = TMENU
lib.field_submenu.1 {
stdWrap.dataWrap = <ul><li class="submenu-top">{leveltitle : 1}</li> | </ul>
noBlur = 1
ACT = 0
NO {
allWrap =  <li class="first">|*|<li>|*|<li class="last">|</li>
}

//– Wrap for Active link
ACT = 1
ACT.wrapItemAndSub = <li class=”first selected”>|*|<li class=”selected”>|*|<li class=”last selected”>|</li>
ACT.ATagParams = class=”selected”
ACT.stdWrap.wrap =  <span class=”selected”>|</span>

//– Wrap for current link
CUR = 1
CUR.wrapItemAndSub = <li class=”first selected”>|*|<li class=”selected”>|*|<li class=”last selected”>|</li>
CUR.ATagParams = class=”selected”
CUR.stdWrap.wrap =  <span class=”selected”>|</span>
}

Annonser

Kommentera

Fyll i dina uppgifter nedan eller klicka på en ikon för att logga in:

WordPress.com Logo

Du kommenterar med ditt WordPress.com-konto. Logga ut / Ändra )

Twitter-bild

Du kommenterar med ditt Twitter-konto. Logga ut / Ändra )

Facebook-foto

Du kommenterar med ditt Facebook-konto. Logga ut / Ändra )

Google+ photo

Du kommenterar med ditt Google+-konto. Logga ut / Ändra )

Ansluter till %s