Zum Inhalt springen

Menü aufsplitten?

Erstellt am 28. April 2005 · 8 Antworten · letzte Antwort am 1. Mai 2005

Tags: Frage

s4mba ·

Hallo,
ich möchte mein menü an einer bestimmten Position aufteilen.

Also hier mal ein beispiel:

[Seite1]
[Seite2]
[Seite3]
-----aufteilung-----
[Seite4]
[Seite5]
[Seite6]

Also ich moechte die ersten 3 Level1-Links per

<dív id="menu1">...</div>

in mein Template einfuegen und die anderen 3 per

<div id="menu2">...</div>

einbinden.
(Also die Submenues sollen automatisch mit eingebunden werden unter ihre Level1-Links, also die submenues sollen ganz normal ein/ausgeklappt werden unter den dazugehoerigen Level1-links!!!!)

Was muss ich da in der TS-Setup eintragen?

Hier meine aktuelle Template-Setup:

# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
    # Read the template file:
  content = FILE
  content.file = fileadmin/template/Amsbet/template.htm
 
    # 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
 
    TD.all = 1
  }
 
    # Prefix all relative paths with this value:
  relPathPrefix = fileadmin/template/Amsbet/
}

# 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 = <p><div class="menu1-level1-no"> | </div></p>
  NO.stdWrap.htmlSpecialChars = 1
    # Enable active state and set properties:
  ACT = 1
  ACT.stdWrap.htmlSpecialChars = 1
  ACT.allWrap = <p><div class="menu1-level1-act"> | </div></p>
}

  # 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>
  NO.stdWrap.htmlSpecialChars = 1
    # Enable active state and set properties:
  ACT = 1
  ACT.stdWrap.htmlSpecialChars = 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-parser to the TEMPLATE cObject:
  template =< plugin.tx_automaketemplate_pi1
    # Select only the content between the <body>-tags
  workOnSubpart = DOCUMENT_BODY
 
    # Substitute the ###menu_1### subpart with dynamic menu:
  subparts.menu_1 < temp.menu_1
 
    # Substitute the ###content### subpart with normal-content:
  subparts.content < styles.content.get

    # Substitute the ###right_content### subpart with right-content
  subparts.right_content < styles.content.getRight

}
 
 
# 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

(Also im großen und ganzen ist das die Standart-Setup von 'Moderne templateerstellung' von typo3.org)

Was muss ich da jetzt machen?

Bis dann.
s4mba

tomek909 ·

Ich glaub optionSplit ist dafür zuständig.
Damit kannst Du das Menü in || Anfang | Mitte | Ende || aufteilen.

Aber was du da genau eintragen musst kann ich dir leider nicht sagen.

mfg
TOmek909

s4mba ·

mh danke erstmal.. ich schau es mir mal an 🙂

Falls noch jemand was weiss, bitte bescheid sagen!!
Danke 🙂

nevyn ·

Sollte in etwa so funktionieren

 NO.allWrap = <dív id="menu1">|</div>||<dív id="menu1">|</div>||<dív id="menu1">|</div>|*| |*|<dív id="menu2">|</div>||<dív id="menu2">|</div>||<dív id="menu2">|</div>

Ja optionsplit ist das richtige 🙂

Grüße Helmuth

s4mba ·

Hi 🙂

Deine idee ist gut, allerdings wird dann das menü nichtmehr flexibel sein, also wenn neue Seiten hinzukommen gibt es Probleme..

nevyn ·

Von erweitern hast du nichts gesagt 🙂
du hast von 3 und 3 gesprochen :p
Wie sollte es sich bei einer erweiterung verhalten?

s4mba ·

Naja sagen wir es is nich 3x3 sondern 4x12 oder so.. was weiss ich..

Naja also ich hab das jetz halbwegs anders geloest.. danke trotzdem fuer deine muehe 🙂

pid ·

Es gibt einen Seitentyp "Spacer". Der sollte genau bei deinem Problem helfen. Mach dich da mal schlau.

toyde ·

hi.

pid's Tip wird dir helfen.
Und wenn das deine Bedürnisse immer noch nicht deckt:
dann mach doch 2 Menüs !!
-> 2 subparts, oder 2 marker an gewünschter Stelle untereinander/nebeneinander. Den Trenner kannste ja dann im html festlegen, oder noch besser mit OptionSplit für das letzte Element von Menu1.

Also so:

Menu1
--Punkt1.1
--Punkt1.2
--Punkt1.3
Menu2
--Punkt2.1
--Punkt2.2
etc..

-> den Abstand zwischen Menu1 und Menu2 kannste ja wie angesprochen mit optionSplit für das letzte Element im Menu1 festlegen - und bleibt somit flexibel 8-)

Referenz optionSplit(TSref):
https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/Functions/OptionSplit.html

bye bye