Hallo, ich versuche seit Tagen just2b's horizontales Menu ans laufen zu bringen. #39055
Es tut es auch ganz gut, außer dass die menuparent Funktion nicht greift.
Daher zeigt das Menu dann halt auch nicht den Pfeil an, der anzeigt ob es noch ein Untermenu gibt...
Es wäre wirklich Toll, wenn mir jemand auf Die Sprünge helfen könnte...
Danke!
Emil
Hier meine verschiedenen Codes, das CSS hab ich mal mit angehängt, ist aber 1:1 aus dem Beispiel übernommen:
# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
# Read the template file:
content = FILE
content.file = fileadmin/templates/main/rootpage.html
# Here we define which elements in the HTML that
# should be wrapped in subpart-comments:
elements {
BODY.all = 1
BODY.all.subpartMarker = DOCUMENT_BODY
HEAD.all = 1
HEAD.all.subpartMarker = DOCUMENT_HEADER
HEAD.rmTagSections = title
DIV.all = 1
}
# Prefix all relative paths with this value:
relPathPrefix = fileadmin/templates/main/
}
# Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
# Feeding the content from the Auto-parser to the TEMPLATE cObject:
template =< plugin.tx_automaketemplate_pi1
# Select only the content between the <body>-tags
workOnSubpart = DOCUMENT_BODY
# Substitute the ###topmenu### subpart with dynamic menu:
# subparts.nav < temp.MENU
#MENU
subparts.nav = HMENU
subparts.nav {
special = directory
special.value = 22
1 = TMENU
1 {
expAll = 1
wrap = <ul id="nav">|</ul>
noBlur = 1
NO = 1
NO.wrapItemAndSub = <li>|</li>
IFSUB = 1
IFSUB.wrapItemAndSub = <li class="menuparent">|</li>
ACTIFSUB < .IFSUB
}
2 < .1
2.wrap = <ul>|</ul>
3 < .2
4 < .2
}
# Main TEMPLATE cObject for the HEAD
temp.headTemplate = TEMPLATE
temp.headTemplate {
# Feeding the content from the Auto-parser to the TEMPLATE cObject:
template =< plugin.tx_automaketemplate_pi1
# Select only the content between the <head>-tags
workOnSubpart = DOCUMENT_HEADER
}
# Default PAGE object:
page = PAGE
page.typeNum = 0
# Copying the content from TEMPLATE for <body>-section:
page.10 < temp.mainTemplate
# Copying the content from TEMPLATE for <head>-section:
page.headerData.10 < temp.headTemplate
page {
headerData = COA
headerData.11 = TEXT
headerData.11.value = <script type="text/javascript" src="fileadmin/templates/main/css/menu.js"></script>
}
<!--###DOCUMENT_HEADER###-->
<link rel="stylesheet" type="text/css" href="css/menu.css" />
<!--###DOCUMENT_HEADER###-->
<!-- ###DOCUMENT_BODY### -->
<div id="nav"> </div>
<!-- ###DOCUMENT_BODY### -->
#nav, #nav ul {
float: left;
width: 86em;
list-style: none;
line-height: 1em;
background: white;
color: #000;
font-weight: bold;
padding: 0;
border: solid #eda;
border-width: 1px 0;
margin: 0 0 1em 0;
}
#nav a {
display: block;
width: 10em;
color: #7C6240;
text-decoration: none;
padding: 0.25em 0em;
}
#nav a.menuparent {
background: url(arrow.gif) no-repeat 90% 40%;
}
#nav li {
float: left;
padding: 0;
width: 10em;
}
#nav li ul {
position: absolute;
left: -999em;
height: auto;
width: 14em;
font-weight: normal;
border-width: 0.25em;
margin: 0;
}
#nav li li {
width: 14em
}
#nav li ul a {
width: 14em;
padding-left: 1em;
}
#nav li ul ul {
margin: -1.75em 0 0 14em;
}
#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul {
left: -999em;
}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul {
left: auto;
}
#nav li:hover, #nav li.sfhover {
background: #eda;
color: white;
}