Reputation: 59
I want to make a Header menu, witch should be static through all subpages. At Home page I have this typoscript and works fine
//this is a subpart
MENU_HEADER = COA
MENU_HEADER {
10 = HMENU
10 {
wrap = <ul>|</ul>
entryLevel = 0
1 = TMENU
1 {
//expAll = 1
target = _top
NO = 1
NO {
allWrap = <li class="list1">|</li>
stdWrap.innerWrap = <strong><img src="fileadmin/templates/img/header/menu-list1-icon.png" width="45px" height="50px;" alt=""></strong><span>|</span>
}
}
}
In my subpages I have the following typoscript code:
MENU_PAGES = COA
MENU_PAGES {
10 = HMENU
10 {
entryLevel = 0
wrap = <ul>|</ul>
1 = TMENU
1 {
//expAll = 1
//noBlur = 1
target = _top
NO = 1
NO {
stdWrap.htmlSpecialChars = 1
stdWrap.innerWrap = <span>|</span>
allWrap = <li class="list1">|
}
CUR = 2
CUR {
stdWrap.innerWrap = <span>|</span>
allWrap = <li class="list1 active">|
}
}
2 = TMENU
2 {
wrap = <a href="#" class="hasSub"></a><ul class="dropdown">|</ul></li>
target = _top
NO {
wrapItemAndSub = <li>|</li>
}
CUR < .NO
CUR = 1
CUR {
allWrap = <li class="subactive">|</li>
}
ACT < .CUR
ACT = 1
}
}
}
In this second part, only subpages of the current page are shown in the menu. As I mentioned above I need all the parent pages and their child appear in my menu. I tried entryLevel = -1 but nothing happened!
Upvotes: 0
Views: 653
Reputation: 2249
This might be help you:
lib.navbar = COA
lib.navbar.wrap = <nav>|</nav>
lib.navbar {
special = directory
special.value = 1
1 = TMENU
1 {
wrap = <ul class="nav sf-menu">|</ul>
expAll = 1
NO = 1
NO.allWrap >
NO.wrapItemAndSub = <li>|</li>
ACT = 1
ACT < .NO
ACT.wrapItemAndSub = <li class="active">|</li>
CUR = 1
CUR < .NO
CUR.wrapItemAndSub = <li class="active">|</li>
}
2<.1
2.wrap = <ul class="submenu">|</ul>
}
This is the same as you want. on hover will display sub-pages of the current page if exist. you have to change wrapping as per your requirement.
Upvotes: 2