Hallo
Habe ein grafisches GMENU mit drei Ebenen erstellt. Mir fehlt jetzt noch die korrekte Nummerierung:
[Stufe 1, erster Eintrag 1.0.0]
[Stufe 1, zweiter Eintrag 2.0.0]
[-Stufe 2, erster Eintrag 2.1.0]
[-Stufe 2, zweiter Eintrag 2.2.0]
[--Stufe 3, erster Eintrag 2.2.1]
[--Stufe 3, zweiter Eintrag 2.2.2]
[-Stufe 2, dritter Eintrag 2.3.0]
[Stufe 1, dritter Eintrag 2.0.0]
Für die erste Stufe habe ich folgendes an meinen Menü Eintrag angehängt:
{register:count_MENUOBJ}.0.0
Für die zweite Stufe wollte ich genau gleich vorgehen:
x.{register:count_MENUOBJ}.0
Dummerweise scheint count_MENUOBJ zusätzlich zum lokalen Zähler noch die Anzahl der "Eltern Einträge" zu zählen.
Im Obigen Beispiel erhalte ich statt:
[-Stufe 2, erster Eintrag 2.1.0]
die folgende Ausgabe:
[-Stufe 2, erster Eintrag x.4.0]
[-Stufe 2, zweiter Eintrag x.5.0]
3 Eltern Einträge plus den den aktuellen Zähler.
Zwei Probleme:
Wie finde ich die Anzahl der Eltern Einträge heraus und ziehe sie der Variabe count_MENUOBJ ab?
Wie kann ich die Position des offenen Eltern Menü Punktes herausfinden und als Variable "x" reinschreiben?
Nachfolgend meine Konfiguration (mal für zwei Menü Stufen):
temp.menu = HMENU
temp.menu.entryLevel = 1
temp.menu.1 = GMENU
temp.menu.1 {
wrap = <ul class="menu1">|</ul>
NO = 1
NO {
wrap = <li class="menu1-level1">|</li>
backColor = {$color.DarkGrey}
XY = 190, 17
10 = TEXT
10.text.field = title
10.fontColor = {$color.Black}
10.fontFile = {$font.Bold}
10.fontSize = 11
10.niceText = 1
# 12: Linker Abstand, 14: Abstand vom oberen Rand
10.offset = 12, 13
20 = TEXT
20.fontColor = {$color.Black}
# Shows the current Menu Item
20.text.dataWrap = | {register:count_MENUOBJ}.0.0
20.fontFile ={$font.Bold}
20.fontSize = 11
20.niceText = 1
# 12: Linker Abstand, 14: Abstand vom oberen Rand
20.offset = 155, 13
}
}
temp.menu.2 = GMENU
temp.menu.2 {
wrap = <ul class="menu1">|</ul>
NO = 1
NO {
wrap = <li class="menu1-level2">|</li>
backColor = {$color.White}
XY = 190, 17
10 = TEXT
10.text.field = title
10.fontColor = {$color.Black}
10.fontFile = {$font.Normal}
10.fontSize = 11
10.niceText = 1
# 12: Linker Abstand, 14: Abstand vom oberen Rand
10.offset = 12, 13
20 = TEXT
20.fontColor = {$color.Black}
# Shows the current Menu Item
20.text.dataWrap = | {register:count_MENUOBJ}.0.0
20.fontFile ={$font.Normal}
20.fontSize = 11
20.niceText = 1
# 12: Linker Abstand, 14: Abstand vom oberen Rand
20.offset = 155, 13
}
}
Vielen Dank im Voraus für jedliche Hilfe!
Mit freundlichem Gruss, eichi