[TYPO3-english] HMENU/TMENU without NO but with CUR and ACT not possible?
Matthew Colton
mat at colton.de
Thu Oct 8 08:02:22 CEST 2009
Hi
inline.
Am Mittwoch, 7. Oktober 2009 21:30:46 schrieb Peter Niederlag:
> Matthew Colton schrieb:
> > Hi ppl,
> > a quick question about HMENU: I want to create a submenu which shows the
> > current active top level menu item and all subitems.
> > My problem is, that the navigation isn't rendered if I only set CUR and
ACT
> > but not NO.
> > I only want the current/active element, not the normal elements as i
format
> > the "link" with doNotLinkIt and use it as a header by linkwrapping it.
>
> you probably should show some code to get better help.
What it's supposed to do:
- Show the current or active top-level nav item as a H2
- Hide the H2 when there are no sub-nav items ("if" condition)
This is what I've done so far:
lib.sub_nav = HMENU
lib.sub_nav {
special = directory
special.value = 3
1 = TMENU
1 {
NO = 1
NO.ATagParams = style="display: none;"
CUR = 1
CUR.linkWrap = <h2>|</h2>
CUR.doNotLinkIt = 1
ACT < .CUR
ACT = 1
}
2 = TMENU
2 {
wrap = <ul>|</ul>
NO = 1
NO.wrapItemAndSub = <li>|</li>
CUR < .NO
CUR = 1
CUR.wrapItemAndSub = <li class="selected">|</li>
ACT < .CUR
ACT = 1
}
}
I don't like the CSS stuff in there. Entrylevel would be ok, but I need the
top-level for the H2. I've thought about using leveltitle for the H2, but I'm
not sure if makes sense.
Any help appreciated! :)
Matthew
> common approach IIRC is to use some of the special properties of HMENU:
>
> page.xy 0 = HMENU
> page.xy 0 {
> entryLevel = -2
> // alternative use .special
> // special.value = directory
> // special.value.field = uid
> }
>
> hth,
> Peter
> --
> Peter Niederlag
> http://www.niekom.de * TYPO3 & EDV Dienstleistungen *
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
>
More information about the TYPO3-english
mailing list