[TYPO3-english] TMENU
Stefano Kowalke
blueduck at gmx.net
Sat Jun 27 10:43:15 CEST 2009
Hi Michael,
> Can you provide a sample listing of URLs and what the menu HTML is to look
> like?
The URL its not the problem.
in a very common case you have pages in the pagetree which becomes the
1st menu level
root
home
products
links
With TMENU you build the menu and it is possible to build also a submenu
from the childpages.
root
home
about us
how you find us
products
item 1
item 2
item 3
links
our partners
our friends
With the menu state NO/RO/ACT/CUR you could insert a custom css class
for each state. As result the activ item is hightlighted or something else.
The same behavior you want for the 2nd and 3rd level. If you navigate to
"about us", the menu item "home" should be hightlighted.
This is possible because T3 know (from the pid) the page "about us" is a
child element from "home".
My setup is different from this common. The pagetree looks like this:
root
1991
red
blue
1998
red
green
yellow
2000
blue
yellow
menu
home
about yellow pages
about red pages
about green pages
about blue pages
All the "red" pages are subpages from "about red pages".
If the user navigate to a red page the menu item "about red pages"
should be highlighted. This is not possible (out of the box) because
their is no relation between a red page in 1991 an the page "about red
pages".
For a other issue a create layout for the page settings. If the user
create a red page, he/she select the red layout. This was stored with
integer in the layout field in pages table.
The TS from Joey fetch the layout from the current page and define the
combination of layout and menu item for inserting the class.
lib.mainMenu.1.NO.allWrap.cObject = CASE
lib.mainMenu.1.NO.allWrap.cObject {
key.dataWrap = L{TSFE:page|layout}P{field:uid}
default = TEXT
default.value = <li>|
L1P1301 = TEXT
L1P1301.value = <li class="current">|
L2P1300 < .L1P1301
L3P1295 < .L1P1301
L4P1296 < .L1P1301
}
Hope i explain it well, otherwise ask again :-)
Regards,
Stefano
More information about the TYPO3-english
mailing list