[TYPO3-english] treeLevel = -1

JoH asenau info at cybercraft.de
Thu Mar 11 13:32:05 CET 2010


Actually this is the complete 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
}

now use temp.mymenu in your TS-Setup:

page.10 < temp.mymenu

or maybe

marks.WHATEVER < temp.mymenu

Within TV it might be necessary to use lib.defaultmenu and lib.mymenu
instead of temp.

I just mentioned the numRows approach, since it would be another way to
check for subpages of the current page, but then again you would run into
problems with localized pages, since they are coming from a another table.
So HMENU is the way to go and you should do it the way I did it in the above
example.

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




More information about the TYPO3-english mailing list