[TYPO3] Menus - at the end of my string!
Peter Klein
peter at umloud.dk
Wed Mar 8 09:30:05 CET 2006
Hi Matthew. I suggest you use a different approch, and use the "numRows"
property. Here's an example:
-- cut --
lib.mrmenu = COA
lib.mrmenu {
# Menu shown if current page got subpages
10 = HMENU
10.special = directory
10.special.value.field = uid
10.if.isTrue.numRows {
table=pages
select.pidInList.data = uid
}
10.1 = TMENU
10.1 {
wrap = <ul id="side-menu">|</ul>
NO {
linkWrap = <li>|</li>
}
}
# Menu shown if current page doesn't have any subpages
20 = HMENU
20.special = directory
20.special.value.field = pid
20.if.negate = 1
20.if.isTrue.numRows {
table = pages
select.pidInList.data = uid
}
20.1 = TMENU
20.1 {
wrap = 2<ul id="side-menu">|</ul>
NO {
linkWrap = <li>|</li>
}
}
}
page.100 < lib.mrmenu
-- cut --
--
Peter Klein/Umloud Untd
"Matthew Runo" <matthew at somethingbig.org> skrev i en meddelelse
news:mailman.1.1141768684.21453.typo3-english at lists.netfielders.de...
> Hi everyone,
>
> I've really reached the end of my line working with menus in Typo3. It
> seems that menus are very easy - if you want something simple. What I want
> is simple - I think. I want an automatically generated menu that displays
> all the subpages of a page - and if there are none, it should display all
> the pages at the same level as the page.
>
> I have rigged up a menu which shows all the subpages for the parent of the
> page - except that this does not work when the pages are "secton headers".
> In this case, the menu shows a list of all the sections - and not the
> contents of the current section like it should.
>
> I have also rigged up a menu which shows all the subpages to the current
> page. This works fine, except when there are no subpages - it shows
> nothing then.
More information about the TYPO3-english
mailing list