[TYPO3-core] RFC #12505: Bug: JSMENU's showActive is broken
Joerg Wagner [DigiLog]
news.netfielders.de at digilog.de
Mon Nov 16 23:26:14 CET 2009
To easily reproduce the problem and its cure take these steps:
- In a virgin TYPO3...
- build a page tree like this:
P1
P2
P3
P4
P5
P6
P7
- use the TS setup below
(I assume that each page has a uid corresponding to its page number,
otherwise you will have to modify the uids in page.35.special.value and
page.45.special.value)
This will render four JSMENUs and a conventional text menu (for
comparison). Use the conventional menu to navigate to all pages and see
whether the dropdowns of each JSMENU will default to the current page
and its rootline (if those are contained in that JSMENU).
The only JSMENU where this will always work correctly without the patch
is the first one (because it starts at the root page, which is the only
case in which the old isactive algorithm is correct). The other 3
JSMENUS will NEVER default to anything (the dropdowns will always
default to the empty entry).
With the patch, all JSMENUs will correctly default to the currently
active page and its parents if possible.
Cheers,
Jörg
#---------- TS-SETUP START -------------------
page = PAGE
page.typeNum = 0
page.10 = TEXT
page.10.value = <br><b>JSMENU normal:</b><br>
page.15 = HMENU
page.15{
1 = JSMENU
1 {
menuName = menu1
levels = 3
1.showActive = true
2.showActive = true
3.showActive = true
}
}
page.20 = TEXT
page.20.value = <br><b>JSMENU using entryLevel=1:</b><br>
page.25 = HMENU
page.25{
entryLevel=1
1 = JSMENU
1 {
menuName = menu2
levels = 3
1.showActive = true
2.showActive = true
3.showActive = true
}
}
page.30 = TEXT
page.30.value = <br><b>JSMENU in HMENU special=directory:</b><br>
page.35 = HMENU
page.35{
special=directory
special.value=2
1 = JSMENU
1 {
menuName = menu3
levels = 3
1.showActive = true
2.showActive = true
3.showActive = true
}
}
page.40 = TEXT
page.40.value = <br><b>JSMENU in HMENU special=list:</b><br>
page.45 = HMENU
page.45{
special=list
special.value=3,4
1 = JSMENU
1 {
menuName = menu4
levels = 3
1.showActive = true
2.showActive = true
3.showActive = true
}
}
page.90 = TEXT
page.90.value = <br><b>HMENU full menu (to compare against):</b><br>
page.95 = HMENU
page.95{
1=TMENU
1 {
expAll=1
NO=1
NO{
allWrap=|<br>
}
ACT<.NO
ACT{
stdWrap.wrap = <span style="font-weight: bold; color:#c00;">|</span>
}
}
2<.1
2.NO.allWrap=-- |<br>
2.ACT.allWrap=-- |<br>
3<.1
3.NO.allWrap=---- |<br>
3.ACT.allWrap=---- |<br>
4<.1
4.NO.allWrap=------ |<br>
4.ACT.allWrap=------ |<br>
5<.1
5.NO.allWrap=-------- |<br>
5.ACT.allWrap=-------- |<br>
}
#---------- TS-SETUP END -------------------
More information about the TYPO3-team-core
mailing list