[Typo3] Current menu item on top (first in the list)
Cyprian Kowalczyk
cyprian at pi2.pl
Fri Sep 16 22:15:18 CEST 2005
Thanks everyone for answers.
Berfore I read your posts I'd made something on my own - here is the code
and comments what I wanted to gain:
temp.mainMenu = COA // COA is holding two menus - one for current menu on
top, and normal menu
temp.mainMenu.1 = HMENU // current menu on top
temp.mainMenu.1 {
if { // shown on every page but root
value.data = TSFE : id
isLessThan = 1
}
1 = TMENU
1 {
NO {
doNotShowLink = 1 // Don't show links...
}
CUR = 1 // ...except current one
CUR {
.
.
}
}
2 = TMENU // submenu for the current menu
2 {
.
.
}
}
}
temp.mainMenu.2 = HMENU // the 'normal menu' placed on bottom
temp.mainMenu.2 {
1 = TMENU
1 {
NO { // show every page...
.
.
}
CUR = 1 // except current on
CUR {
doNotShowLink = 1
}
}
}
It works well with the pages that are direct childs of root page, yet I
have one problem if I enter a page on level 2 or below.
To illustrate it:
MENU 3 (current)
| submenu 1
| submenu 2
MENU 1
MENU 2
MENU 4
MENU 5
But if I enter, for instance, 'submenu 1' the 'MENU 1' label disapears
from top meu and aperars in the bottom one...
It's normal because MENU3 is no more current menu. Is there a way to fix
it?
Maybe some condition is to put in CUR { .. } to let it be shown if it's
the parent of current submenu...
I hope I'm clear enough :)
Thanks.
Cyprian
More information about the TYPO3-english
mailing list