[TYPO3-english] Snippets: Section index instead of submenu

Jan Bednarik info at bednarik.org
Wed Feb 9 18:54:59 CET 2011


Hey guys,

does snippets.typo3.org work for you? I can't get to any snippet detail 
and I can't find link to add new snippet.

I've got one I'd like to share. So far it's my TS masterpiece :).

With this snippet you can display section index instead of a submenu in 
regular HMENU. Section index is displayed only when there is a Spacer as 
the first subitem.

With this structure

A
- B
C
- SPACER

A menu like this

A
- B
C
- Section index

would be displayed.

lib.menu = HMENU
lib.menu {
wrap = <ul>|</ul>
1 = TMENU
1 {
     noBlur = 1
     expAll = 1
     NO {
         wrapItemAndSub = <li>|</li>
     }
     ACT < .NO
     ACT = 1
     ACT.ATagParams = class="act"
}
2 < .1
2.SPC = 1
2.SPC.doNotLinkIt = 1
2.SPC.stdWrap.setCurrent = section||nothing
2.stdWrap {
override.cObject = HMENU
override.cObject {
   special = list
   special.value.field = pid
   1 = TMENU
   1.noBlur = 1
   1.NO.allWrap = <li style="display:none">|</li>
   1.NO.doNotLinkIt = 1
   1.NO.override = &nbsp;
   1.expAll = 1
   2 = TMENU
   2.sectionIndex = 1
   2.noBlur = 1
   2.NO.allWrap = <li>|</li>
}
override.if.value.current = 1
override.if.equals = section
}
}

Regards

Jan Bednarik


More information about the TYPO3-english mailing list