[TYPO3-german] Lösung - Textmenü: CUR mit 2 unterschiedlichen wraps
Ulrich Fischer
ulrich-fischer at gmx.net
Wed Jul 25 14:21:34 CEST 2007
Hallo Jo und Peter,
danke für die Antworten :-)
Also der Punkt nach dem Link.
Dann muss öfters zweimal gewrappt werden -
Und fertig ist das Snippet für ein barrierearmes
hierarchisch durchnummeriertes Sub-Menü, das
auf allen Seiten aufgeklappt zu sehen ist.
Ulrich
Output example:
<h3 class="hidden"><dfn>3</dfn> Headline</h3>
<ul>
<li><dfn>3.1</dfn><span class="current">Link Text 1</span><span
class="hidden">.</span>
<ul>
<li><a href="info.html"><dfn>3.1.1</dfn>Sublink Text 1</a><span
class="hidden">.</span></li>
<li><a href="info.html"><dfn>3.1.2</dfn>Sublink Text 2</a><span
class="hidden">.</span></li>
<li><a href="info.html"><dfn>3.1.3</dfn>Sublink Text 3</a><span
class="hidden">.</span></li>
</ul>
</li>
<li><a href="tech.html"><dfn>3.2</dfn>Link Text 2</a><span
class="hidden">.</span></li>
</ul>
-----------------------------------------------
typoScrpt example
#temp.submenu
temp.submenu = COA
temp.submenu {
10 = HMENU
10 {
special = directory
special.value = 29
#entryLevel = 1
1 = TMENU
1 {
noBlur = 1
wrap = <ul>|</ul>
NO = 1
NO {
stdWrap.wrap = |<span class="hidden">.</span>
wrapItemAndSub = <li>|</li>
stdWrap.prepend = COA
stdWrap.prepend {
10 = LOAD_REGISTER
10 {
# L2N: Level2Number
tempN.data = register:L2N
tempN.wrap = |+1
L2N.data = register:tempN
L2N.prioriCalc = 1
L3N = 0
}
20 = COA
20 {
wrap = <dfn>3.|</dfn>
10 = TEXT
10.data = register:L2N
10.wrap = |
100 = Text
100.value =
}
}
}
ACT < .NO
ACT = 1
ACT {
wrapItemAndSub = <li class="parent">|</li>
}
CUR < .NO
CUR = 1
CUR {
doNotLinkIt = 1
stdWrap.wrap = <span class="current>|</span><span class="hidden">.</span>
}
}
2 < .1
2 {
NO.stdWrap.prepend {
10 {
# L3N: Level1Number
tempN.data = register:L3N
L2N >
L3N.data = register:tempN
L3N.prioriCalc = 1
}
20 {
10.wrap = |.
20 = TEXT
20.data = register:L3N
20.wrap = |
}
}
ACT < .NO
ACT = 1
ACT {
wrapItemAndSub = <li class="parent">|</li>
}
CUR < .NO
CUR = 1
CUR {
doNotLinkIt = 1
stdWrap.wrap = <span class="current>|</span><span class="hidden">.</span>
}
}
}
}
# in the rootline of the active submenu no special but entryLevel
[PIDinRootline = 29]
temp.submenu.10.special >
temp.submenu.10.entryLevel = 1
# Home page without subemnu
[globalVar = TSFE:id = 47]
temp.submenu >
temp.submenu = TEXT
temp.submenu.value =
[END]
-----------------------------------------------
CSS example
.hidden, dfn {
position: absolute;
left: -1000px;
top: -10000px;
width: 0;
height: 0;
overflow:hidden;
display:inline;
}
#submenu {
float: left;
width: 191px;
}
#submenu ul{
margin: 0;
padding: 0;
list-style: none;
}
#submenu li{
margin: 0 0 2px 0;
}
*html #submenu li{
margin: 0;
border-bottom: 2px solid #fff;
}
*html #submenu ul ul{
margin: 0 0 -2px 0;
}
#submenu ul a,
#submenu ul a:link,
#submenu ul a:visited,
#submenu ul .current {
display: block;
padding: 5px 5px 4px 8px;
color: #fff;
background-color: #0075A1;
text-decoration: none;
}
#submenu ul a:hover,
#submenu ul .current,
#submenu ul .parent a,
#submenu ul .parent a:link,
#submenu ul .parent a:visited {
color: #fff;
background-color: #0087B7;
}
#submenu ul ul a,
#submenu ul ul a:link,
#submenu ul ul a:visited,
#submenu ul ul .current,
#submenu ul .parent ul a,
#submenu ul .parent ul a:link,
#submenu ul .parent ul a:visited,
#submenu ul .parent ul .current {
display: block;
padding: 5px 5px 4px 8px;
color: #0075A1;
background-color: #d2f0ff;
}
#submenu ul .parent ul a:hover,
#submenu ul .parent ul .current {
font-weight: bold;
padding-left: 22px;
background-image: url(img/submenu_bullet.gif);
background-position: 10px;
background-repeat: no-repeat;
}
--
http://www.sunfish.de
More information about the TYPO3-german
mailing list