Zum Inhalt springen

menu & template probs

Erstellt am 15. Juni 2003 · 2 Antworten · letzte Antwort am 16. Juni 2003

Tags: Frage

ingobert ·

Hallo!

Ich habe folgendes Problem:

Habe mir ein TMENU nach Modern Template Building 1 gemacht. Template liegt auf ROOT und wird allen Seiten "vererbt"!
Meine Struktur:
ROOT
Seite1
Seite2
Unterseite2.1
Unterseite2.2
Seite3
...

Möchte jetzt ein etwas verändertes Template, also statt template_1.html, template_2.html auf meine "Seite2" anwenden. Habe dazu den Code von Setup - Root übernommen und ins Setup Feld von "Seite2" kopiert, aus template_1.html habe ich dann template_2.html gemacht.
Das klappt auch ganz gut! Leider wird aber jetzt nicht meht das ganze Menü im Frontent angezeigt. Nur noch:

Unterseite2.1
Unterseite2.2

Ist irgenwie logisch! Wie muss ich den Code von "Seite2" ändern, damit ich die ganze Menüstruktur angezeigt bekomme?

Hier mein Code:

# Configuring the Auto-Praser for main template:
plugin.tx_automaketemplate_pi1 {
  # Read the template file:
 content = FILE
 content.file = fileadmin/template/main/template_2.html

  # Here we define which elements in the HTML that
  # should be wrapped in subparts-comments:
 elements {
  BODY.all = 1
  BODY.all.subpartMarker = DOCUMENT_BODY

  HEAD.all = 1
  HEAD.all.subpartMarker = DOCUMENT_HEADER
  HEAD.rmTagSections = title

  TD.all = 1
}

  # Prefix all relative paths with this value:
 relPathPrefix = fileadmin/template/main/
}

# Menu 1 cObject
temp.menu_1 = HMENU

# First level menu-object, textual
temp.menu_1.1 = TMENU
temp.menu_1.1 {
  # Normal state properties
 NO.allWrap = <div class="menu1-level1-no"> | </div>
  #Enable active state and set properties:
 ACT = 1
 ACT.allWrap = <div class="menu1-level1-act"> | </div>
}
 #Second level menu-object, textual
 temp.menu_1.2 = TMENU
 temp.menu_1.2 {
  #Normal state properties
 NO.allWrap = <div class="menu1-level2-no"> | </div>
  #Enable active state and set properties:
 ACT = 1
 ACT.allWrap = <div class="menu1-level2-act"> | </div>
}

# Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
  # Feeding the content from the Auto-praser to the TEMPLATE cObject:
 template =< plugin.tx_automaketemplate_pi1
# Select only the content between the <body>-tags
 workOnSubpart = DOCUMENT_BODY

# Substitute the ###menu_1### with dynamic menu:
 subparts.menu_1 < temp.menu_1

# Substitute the ###content### with some example content:
 subparts.content < styles.content.get
 subparts.content_right < styles.content.getBorder
}

# Main TEMPLATE cObject for the HEAD
temp.headTemplate = TEMPLATE
temp.headTemplate {
  # Feeding the content from the Auto-praser 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

Danke im Voraus!
Ingo

db ·

Du solltest Dir in der TS-Referenz die Eigenschaft
entryLevel durchlesen (HMENU, GMENU, TMENU).
Das ist die Lösung zu Deinem Problem.

ingobert ·

Danke für den Tip!

Leider habe ich trotzdem etwas länger gebraucht bis es geklappt hat!
Habe nun nach:

temp.menu_1 = HMENU

folgendes hinzugefügt:

temp.menu_1.entryLevel = 0

leider hat sich dadurch nichts verändert!

Ich hatte vergessen beim Template meiner "Seite2" den Hacken aus Rootlevel: (checkbox) zu entfernen!

Jetzt wird die komplete Navigation auch auf "Seite2" mit neuem template_2.html angezeigt!

Besten Dank!