[TYPO3-english] treeLevel = -1
bilal -
bilal_ at live.nl
Thu Mar 11 09:27:29 CET 2010
Hi Joey,
That was it! Thanks for helping me out. Your solution works.
I haven't got any wraps inside the HMENU, only in the TMENU.
I have 2 normal menu's on the left side (1 original and 1 copy). I just have to figure out the check with numRows on the pages table and I'm done.
Thanks again! :)
> From: info at cybercraft.de
> Date: Wed, 10 Mar 2010 18:22:02 +0100
> To: typo3-english at lists.typo3.org
> Subject: Re: [TYPO3-english] treeLevel = -1
>
> > I normally want to have menu A on every page, except when the page is
> > on the last level of the current rootline, then I want menu B. The
> > last level of the rootline is unknown, it could be level 3 in one
> > part of the tree and level 7 in another part.
>
> So you want to replace menu A with menu B, as soon as there are no subpages
> available.
> After all it's not that hard do explain ;-)
>
> Solution:
>
> temp.defaultmenu = HMENU
> temp.defaultmenu {
> entryLevel = -1
> 1 = TMENU
> 1 {
> wrap = <ul>|</ul>
> NO {
> wrapItemAndSub = <li>|</li>
> }
> }
> }
>
> temp.mymenu < temp.defaultmenu
> temp.mymenu {
> stdWrap.ifEmpty.cObject < temp.defaultmenu
> stdWrap.ifEmpty.cObject.entryLevel = -2
> }
>
> In case the first copy of the default HMENU is empty, another copy of the
> same HMENU is used with a different entryLevel. You should use a real HMENU
> and check if it's empty instead of i.e. using a check for numRows on the
> pages table, since HMENU will always return proper results even in localized
> page trees.
>
> The important thing is to have no wrap inside the HMENU but just inside
> TMENU and NO, else the first copy of the HMENU will never be "empty" even
> without having subpages!
>
> HTH
>
> Joey
>
> --
> Wenn man keine Ahnung hat: Einfach mal Fresse halten!
> (If you have no clues: simply shut your gob sometimes!)
> Dieter Nuhr, German comedian
> Xing: http://contact.cybercraft.de
> Twitter: http://twitter.com/bunnyfield
> TYPO3 cookbook (2nd edition): http://www.typo3experts.com
>
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
_________________________________________________________________
Het laatste nieuws, shownieuws en voetbalnieuws op MSN.nl
http://nl.msn.com/
More information about the TYPO3-english
mailing list