I like to overwrite a allWrap option in a typoscript menu definition if a checkbox in the page options is checked. The following pages should be highlighted, so i need to add an extra css class to the list tag.
In my page options i have an boolean named tx_mask_highlight_nav
.
So in my fluid template i have access with {page.tx_mask_highlight_nav}
.
But i need this in my typoscript menu definition.
My current approach looks like this:
lib.menu_main = COA
lib.menu_main {
10 = HMENU
10 {
entryLevel = 0
wrap = |
1 = TMENU
1 {
expAll = 1
NO.allWrap = <li>|</li>
NO.ATagTitle.field = abstract // description // title
NO.allWrap.override = <li class="menu-item--bold">|</li>
NO.allWrap.override.if {
isTrue.data = page:tx_mask_highlight_nav
}
ACT = 1
ACT.wrapItemAndSub = <li class="active">|</li>
ACT.ATagTitle.field = abstract // description // title
IFSUB = 1
IFSUB.wrapItemAndSub = <li>|</li>
IFSUB.ATagTitle.field = abstract // description // title
ACTIFSUB = 1
ACTIFSUB.wrapItemAndSub = <li class="active">|</li>
ACTIFSUB.ATagTitle.field = abstract // description // title
}
1 {
wrap = <ul class="dropdown menu menu--main" data-dropdown-menu>|</ul>
}
2 < .1
2 {
wrap = <ul class="menu vertical">|</ul>
}
3 < .2
4 < .3
5 < .4
}
}
I've tried several other things, for example this:
NO.allWrap.override = <li class="menu-item--bold">|</li>
No.allWrap.override.if {
value = page:tx_mask_highlight_nav
equals = 1
}
But it does not work. Maybe i have no access to page:tx_mask_highlight_nav
?
Would be really thankful for your help!
NO.allWrap.override.if.isTrue.field = tx_mask_highlight_nav
- Heinz Schilling