I took over a client website from another agency and have to fix a problem, which I can't figure out. The website has a main menu, which is displayed on desktop computers. Then there's an additional menu for mobile/responsive, which is faulty.
Reason is this: The menu structure of the main menu was altered. Pages were moved from one tree to another. But because the menu is displayed in columns, they were left in the old tree as a reference and manually displayed on the main menu.
The mobile menu now doesn't display the pages in the submenu of the new tree, because they must be set to "Don't display in menu". I need to include these pages in the responsive menu, but I can't set the whole HMENU to "includeNotInMenu = 1", because there are other pages that shouldn't be displayed.
The code of the responsive menu is this:
lib.responsiveNav = COA
lib.responsiveNav {
10 = HMENU
10 {
entryLevel = 0
1 = TMENU
1 {
expAll = 1
wrap = <ul class="sm sm-simple" id="responsive-menu">|</ul>
target = _top
NO {
wrapItemAndSub = <li>|</li>|*|<li>|</li>|*|<li class="last">|</li>
}
ACT < .NO
ACT = 1
CUR < .NO
CUR = 1
}
2 = TMENU
2 {
expAll = 1
wrap = <ul>|</ul>
target = _top
NO {
wrapItemAndSub = <li>|</li>
}
ACT < .NO
ACT = 1
CUR < .NO
CUR = 1
}
3 = TMENU
3 {
expAll = 1
wrap = <ul>|</ul>
target = _top
NO {
wrapItemAndSub = <li>|</li>
}
ACT < .NO
ACT = 1
CUR < .NO
CUR = 1
}
}
}
All I'd really need is something like:
3 = TMENU
3 {
includeNotInMenu = 1
But TMENU doesn't have this option.
Any ideas how I can display specific pages within the third level that are hidden from the menu?
As the flag
not in Menucan't hold three states you need other options.You need options to hold (at least) three states:
The existing field can only hold the first two states.
for the third state you need another handling.
Of course you might handle the field in combination with the level, but the evaluation would be difficult, as you must do it on your own - and you need to interfere with the existing evaluation.
On the other hand: you can't do a special treatment if the data is not available: if you already excluded the page from menu it will not be available in the data (pages records), which is processed for the menu.
Therefore I would consider a new field
hide on desktop, where you can control visibility for desktop menus. This can be evaluated in typoscript or fluid with an easy condition.