|
|
This is Typoscript example of a three level HMENU making use of the SPC property to enable spacers in the menu. Spacers are not real pages, rather, they are just headlines that appear in the menu. The Typoscript HMENU in this example is the real HMENU used for the left navigation of this site. The grey entries are spacers.
temp.mainMenu= HMENU
temp.mainMenu{
entryLevel = 1
1 = TMENU
1{
wrap = <div id="navLevel1"> <ul id="navlist">|</ul></div>
NO.wrapItemAndSub = <li>|</li>
#Active Links
ACT=1
ACT<NO
#The current link (here just for reference...behavior controlled by CSS)
CUR = 1
CUR<NO
}
2 = TMENU
2{
wrap = <div id="navLevel2"><ul id="navlist2">|</ul></div>
#Activate the spacer function for this menu level
SPC = 1
SPC{
doNotShowLink = 0
doNotLinkIt = 1
#Force the wrap of the spacer
allWrap = <li>|</li>
}
NO{
expAll=1
wrapItemAndSub = <li>|</li>
}
ACT=1
ACT<NO
CUR=1
CUR<NO
}
# third level
3 = TMENU
3{
wrap = <div id="navLevel3"><ul id="navlist3">|</ul></div>
NO.wrapItemAndSub = <li>|</li>
ACT=1
ACT<NO
CUR=1
CUR<NO
}
}
page.2.marks.MENU < temp.mainMenu
#navlist
{
padding-left: 0;
margin-left: 0;
border-bottom: 1px solid gray;
width: 150px;
font-weight: bold;
position: relative;
left: -50px;
}
#navlist li
{
list-style: none;
color: #999999;
margin: 0;
padding: 0.25em;
border-top: 1px solid gray;
}
#navlist li a:link
{
text-decoration: none;
color: #0000FF;
}
#navlist li a:hover
{
text-decoration: none;
color: #0066FF;
}
#navLevel2
{
position: relative;
left: -40px;
}
#navlist2 li
{
list-style: none;
font-weight: normal;
margin: 0;
padding: 0.25em;
border-top: none;
}
#navLevel3
{
position: relative;
left: -40px;
}
#navlist3 li
{
list-style: none;
font-weight: normal;
margin: 0;
padding: 0.25em;
border-top: none;
}
|
|
|
|
|