I have the following page structure:
toppage
-page1
-page2
-page3
-page4
- (menu separator)
-page5
-page6
-page7
-page8
Page1 to page4 are being used to define a horizontal main menu.
Page5 to page7 are being used to define a vertical side menu.
The following typoscript is being used for the main menu:
lib.mainMenu = HMENU
lib.mainMenu.special = directory
lib.mainMenu.special.value = {$main_menu_start_id}
lib.mainMenu.entryLevel = 0
lib.mainMenu.1 = TMENU
lib.mainMenu.1 {
// Fix to limit items in main menu
maxItems = 4
}
Is it possible in typoscript to replace the maxItems approach by something like the following?
- Get the pageid of the menu separator.
- Using a statement to say that mainMenu should end at this pageid.
Risky approach, I doubt if it will be possible to do that with pure TypoScript
Instead I’d suggest to build horizontal menu (pages 1-4) with
special=listexample:and then vertical menu as a menu of all other items except of the previous 4
other way
you can also put the page which is
hidden in menuat the begining let’s call ithorizontal menu itemsand then usespecial=directoryinHMENUto build menu with all sub-items. It’s also easier add/delete/change items without changing the TS:structure:
TS: