Hallo Leute,
habe ein einfaches TMENU.
Ist der Menüpunkt angeklickt , soll der Text des Menüpunktes "bold" sein. Mit CSS a:active funktioniert es leider nicht. Kann mir jemand helfen?
Danke
Hier der Code:
temp.metanavi= COA
temp.metanavi.10 = HMENU
temp.metanavi.10.special = directory
temp.metanavi.10.special.value = 3
temp.metanavi.10.1 = TMENU
temp.metanavi.10.1.target=_main
temp.metanavi.10.1.NO {
linkWrap= <td><img src="fileadmin/templates/images/spacer.gif" width="5"></td><td class="obenLinks" align="center"> | </td><td><img src="fileadmin/templates/images/spacer.gif" width="5"></td><td bgcolor="#ffffff"><img src="fileadmin/templates/images/spacer.gif" width="1"></td>
}
Erzeuge eine HTML-Klasse, die das entsprechende Aussehen erzeugt, und lass den aktiven Menüpunkt diese Klasse zugewisen kriegen:
temp.metanavi.10.1.NO {
linkWrap= <td><img src="fileadmin/templates/images/spacer.gif" width="5"></td><td class="obenLinks" align="center"> | </td><td><img src="fileadmin/templates/images/spacer.gif" width="5"></td><td bgcolor="#ffffff"><img src="fileadmin/templates/images/spacer.gif" width="1"></td>
#...
temp.metanavi.10.1.ACT = 1
temp.metanavi.10.1.ACT {
linkWrap = <div class="active_menu"> | </div>
}
Den Namen der Klasse und was überhaupt erzuegt werden soll (anstelle des divs) natürlich anpassen ´, falls erforderlich.
MartinLeim schriebErzeuge eine HTML-Klasse,
du meinst eine CSS-klasse... 😉
theo schriebMartinLeim schriebErzeuge eine HTML-Klasse,
du meinst eine CSS-klasse... 😉
Eigentlich meine ich eine DOM-Klasse 😉
Diese kann ich sowohl für Javascript als auch für CSS verwenden.
Hab ich doch gemacht, hover wird angenommen aber nicht active!
=>
linkWrap= <td><img src="fileadmin/templates/images/spacer.gif" width="5"></td>
<td class="obenLinks" align="center">
| </td>
Auf den "Zustand" des Links beim Client kannst du dich nicht verlassen. Aber das macht nix, Typo weiß selber, wenn es ein Menü generiert, ob der aktuelle Menüpunkt zur aktuellen Seite gehört oder nicht.
Und dies wird mit dem ACT anstelle des NO charakterisiert.
OK, das hab ich gemacht und jetzt sieht man garkeine Schrift mehr. (kein Menü)
was mach ich falsch?
=>
temp.metanavi= COA
temp.metanavi.10 = HMENU
temp.metanavi.10.special = directory
temp.metanavi.10.special.value = 3
temp.metanavi.10.1 = TMENU
#temp.metanavi.10.1.expAll=1
temp.metanavi.10.1.target=_main
temp.metanavi.10.1.ACT = 1
temp.metanavi.10.1.ACT {
linkWrap= <td><img src="fileadmin/templates/images/spacer.gif" width="5"></td><td class="obenLinks" align="center"> | </td><td><img src="fileadmin/templates/images/spacer.gif" width="5"></td><td bgcolor="#ffffff"><img src="fileadmin/templates/images/spacer.gif" width="1"></td>
}
Mach mal noch den Code für NO dazu!
hab ich auch schon probiert:
temp.metanavi.10.special = directory
temp.metanavi.10.special.value = 3
temp.metanavi.10.1 = TMENU
temp.metanavi.10.1.target=_main
temp.metanavi.10.1.NO {
linkWrap= <td><img src="fileadmin/templates/images/spacer.gif" width="5"></td><td class="obenLinks" align="center"> | </td><td><img src="fileadmin/templates/images/spacer.gif" width="5"></td><td bgcolor="#ffffff"><img src="fileadmin/templates/images/spacer.gif" width="1"></td>
}
temp.metanavi.10.1.ACT = 1
temp.metanavi.10.1.ACT {
linkWrap = <div class="active_menu"> | </div>
}
Hier das CSS:
.obenLinks A:hover {background-color: #8fa4c3; color:#ffffff; text-decoration:none; font-weight:normal; font-size:9pt; font-family:helvetica, arial}
.obenLinks A {background-color: #3d5c88; color:#ffffff; text-decoration:none; font-weight:normal; font-size:9pt; font-family:helvetica, arial}
.active_menu A:active{background-color: #3d5c88; color:#ffffff; text-decoration:none; font-weight:bold; font-size:9pt; font-family:helvetica, arial}
Hm, dann weiß ich leider auch nicht weiter.
Schade, ok trotzdem Danke für deine Mühe
Hallo vielleicht hilft Dir das weiter...
Ich habe allerdings noch einen Trennstrich hinter meinem Menu gewrapped...
Menu | Menu | Menu |
Kannst ja löschen....
Menu
temp.nav_main = HMENU
temp.nav_main.1 = TMENU
temp.nav_main.1.NO.ATagParams = class="navmain"
temp.nav_main.1.NO.before =
temp.nav_main.1.NO.after = <font color="#663300"> |</font>|*| <font color="#663300"> |</font>|*|
temp.nav_main.1.ACT < temp.nav_main.1.NO
temp.nav_main.1.ACT = 1
temp.nav_main.1.ACT.ATagParams = class="navmain2"
und des sind die 2 css Styles:
a.navmain:link {
text-decoration: none;
color:#663300;
font-weight: normal;
font-size: 11px;
}
a.navmain:visited {
text-decoration: none;
color:#663300;
font-weight: normal;
font-size: 11px;
}
a.navmain:hover {
text-decoration: none;
color:#663300;
font-weight: normal;
font-size: 11px;
}
a.navmain:active {
text-decoration: none;
color:#663300;
font-weight: normal;
font-size: 11px;
}
a.navmain2:link {
text-decoration: none;
color:#663300;
font-weight: bold;
font-size: 11px;
}
a.navmain2:visited {
text-decoration: none;
color:#663300;
font-weight: bold;
font-size: 11px;
}
a.navmain2:hover {
text-decoration: none;
color:#663300;
font-weight: bold;
font-size: 11px;
}
a.navmain2:active {
text-decoration: none;
color:#663300;
font-weight: bold;
font-size: 11px;
}
lg Sandra
Hi, ja soweit war ich jetzt auch, aber ich denke mein Problem liegt daran, das mein Menüpunkt (Menü oben)ein Shortcut auf einen anderen Menüpunkt(Menü links) ist. Und Typo3 den Menüpunkt von oben nicht mehr als active sieht!
doof :-(