Hallo!
Ich möchte etwas Typoscript lernen und mache deswegen das Tutorial von typo3.org.
Alles funktioniert, nur bei dem Punkt SUBNAV habe ich ein paar Probleme, auch wenn ich den gesamten Code aus dem ganzen Tutorial 1:1 kopiere. Es handelt sich dabei um diese Seite des Tutorials.
Das einzufügende Coding von Typoscript lautet:
SUBNAV = HMENU
SUBNAV {
// Only display subpages of the page from the main
// navigation, which is in the current rootline.
// Default value of entryLevel is 0, which are the
// pages on the first level.
// We want to begin with those subpages on level 2.
entryLevel = 1
// Definition for pages on level 1
1 = TMENU
1 {
wrap = <ul id="submenu">|</ul>
// Always expand all subpages.
expAll = 1
// Definition per page
// NO: default formatting
NO = 1
NO {
// Each entry is wrapped by
// <li> </li>
wrapItemAndSub = <li>|</li>
}
// ACT: User is on this or below this page
// Activate this state for this menu
ACT = 1
ACT {
// Use another wrap
wrapItemAndSub = <li id="active">|</li>
}
}
// Definition for pages on level 2
// Copy the definitions from level 1,
// but use another wrap.
2 < .1
2.wrap = <ul>|</ul>
}
Das zu erstetzende Subpart:
<!-- #col1: Left Column of the Content Area -->
<div id="col1">
<div id="col1_content" class="clearfix">
<!-- ###SUBNAV### Start -->
<ul id="submenu">
<li><a >Submenu Item 1</a></li>
<li id="active"><a>Submenu Item 2</a></li>
<li>Submenu Item 3
<ul>
<li><a>Subitem 1</a></li>
<li><a>Subitem 2</a></li>
</ul>
</li>
<li><a>Submenu Item 4</a></li>
</ul>
<!-- ###SUBNAV### End -->
</div>
</div>
<!-- #col1: Left Column End -->
Trotzdem wird nichteinmal das ul eingefügt...
Daraufhin habe ich es mir selbst zurechtgeschrieben:
SUBNAV = HMENU
SUBNAV.wrap = <ul id=submenu >|</ul>
SUBNAV.entrylevel = 1
SUBNAV.1 = TMENU
SUBNAV.1.expAll = 1
SUBNAV.1 {
expAll = 1
NO = 1
NO {
// Each entry is wrapped by
// <li> </li>
wrapItemAndSub = <li>|</li>
}
ACT = 1
ACT {
// Use another wrap
wrapItemAndSub = <li id="active">|</li>
}
}
SUBNAV.2 < .1
SUBNAV.2.wrap = <ul>|</ul>
Und ich erhalte ein Menü, doch scheinen hier keine Subseiten auf. Kann mir jemand erklären, was ich hier falsch mache?
Vielen Dank schon mal!