Zum Inhalt springen

Typo3 Menü soll nur den aktiven Menüpunkt mit dessen Untermenüpunkten anzeigen

Erstellt am 22. Juli 2013 · 2 Antworten · letzte Antwort am 13. August 2013

Tags: Frage

macmurdock77 ·

Hallo zusammen,

ich habe eine Seite mit Typo3 4.7.12 gebaut und möchte, dass in einem Menü, dass sich auf allen Folgeseiten befindet nur der jeweilige Hauptmenüpunkt der Folgeseite auf der man sich gerade befindet mit dessen Untermenüpunkten angezeigt wird. Das ganze soll so aussehen: http://dev.m3-communication.de/braun-neu/index.php?id=18#.UezdHY2RWQo
Im Moment habe ich das ganze eher unkonventionell gelöst, indem ich die Untermenüpunkte, die ich nicht angezeigt habe einfach per CSS ausgeblendet habe.

Hier das dazugehörige TS:

 # Linkes Menü erstellen
    	LEFT_NAVI = HMENU
        LEFT_NAVI {
        entryLevel = 1
        special = directory
        special.value = 4
        expAll = 1
        wrap = <ul class="leftmenu">|</ul>
        1 = TMENU
	1 {
	expAll = 1
	wrap = <ul id="nav_oben">|</ul>
	noBlur = 1
	NO = 1
	NO.wrapItemAndSub = <li>|</li>
 
	IFSUB = 1
	IFSUB.wrapItemAndSub = <li class="parent_top">|</li>
	ACTIFSUB < .IFSUB
	ACTIFSUB.wrapItemAndSub = <li class="parent_top_active">|</li>
 
	CUR = 1
	CUR.wrapItemAndSub = <li id="active">|</li>
	}
	2 < .1
	2.wrap = <ul>|</ul>
     }

Und hier mein CSS:

li.parent_top{
	visibility:hidden;
}

li#active a{
	font-family: 'Droid Sans', sans-serif;
	font-size: 16px;
	font-weight: bold;
	color: #6b6b6a;
}

ul li.parent_top_active{
	list-style:none;
}
ul li.parent_top_active a{
	font-family: 'Droid Sans', sans-serif;
	font-size: 23px;
	font-weight: bold;
	color: #6b6b6a;
	border-bottom:1px solid #c8c8c8;
	padding-left:20px;
	padding-right:20px;
	
}
ul li.parent_top_active ul {
	position:relative;
	top:20px;
	right:22px;
}
ul li.parent_top_active ul li a{
	font-family: 'Droid Sans', sans-serif;
	font-size: 16px;
	font-weight: 400;
	color: #6b6b6a;
	border-bottom: 0px solid;
	position:relative;
	right:20px;
}
ul li.parent_top_active ul li {
	list-style-image: url(images/list-style-image.gif);
}

Ist es irgendwie möglich dieses Problem sauber per TS zu lösen?
Bin hier schon am verzweifeln..

macmurdock77 ·

Danke für die Antwort, nur leider hat das nichts geändert.
Hier nochmal mein angepasstes TS:

 # Linkes Menü erstellen
    	LEFT_NAVI = HMENU
        LEFT_NAVI {
        entryLevel = 1
        special = directory
        special.value = 4
        expAll = 1
        wrap = <ul class="leftmenu">|</ul>
        1 = TMENU
	1 {
	expAll = 1
	wrap = <ul id="nav_oben">|</ul>
	noBlur = 1
	NO = 0
	NO.wrapItemAndSub = <li>|</li>
 
	IFSUB = 1
	IFSUB.wrapItemAndSub = <li class="parent_top">|</li>
	ACTIFSUB < .IFSUB
	ACTIFSUB.wrapItemAndSub = <li class="parent_top_active">|</li>
 
	CUR = 1
	CUR.wrapItemAndSub = <li id="active">|</li>
	}
	2 < .1
	2.wrap = <ul>|</ul>

Es werden nach wie vor alle Hauptmenüpunkte angezeigt und nicht nur der auf dem man sich gerade befindet.
Wäre schön, wenn sich das nochmal jemand ansehen könnte, ich hänge an dem Problem jetzt schon seit Wochen, ich kann auch gerne einen Link zu der Seite posten wenn das hilft.