[TYPO3-UG CH] [Typo3-UG CH] Menus in Typo3
David Bruehlmeier
typo3 at bruehlmeier.com
Sat Jan 7 18:50:07 CET 2006
Hallo Manfred,
dies ist leider die falsche Liste für eine solche Frage:
http://wiki.typo3.org/index.php/Swiss-TUG-Newsgroup
Am besten, Du meldest Dich bei der Newsgroup typo3.german
Beste Grüsse,
Dave.
> Hi!
>
> Ich hatte vor kurzem das selbe Problem und habe mit etwas Glück und vielen
> Probieren eine Lösung gefunden - und zwar mit Hilfe des submenuObjSuffix.
>
> Eckpunkte der Lösung:
>
> * Im pagetree existiert als letzte Level-1-Seite eine mit dem Namen
> "."; im Level 2 stehen alle jene Seiten, die ich im Menü oben habe möchte.
>
> * Alle Seiten bis auf die letzte (submenuObjSuffix!) verwende ich ganz
> normal im linken Seitenmenü
>
> * Aus der letzten Seite baue ich das Menü oben, wobei ich den Level 1
> nicht ausgebe
>
> Ist vermutlich nicht die beste Lösung (vor allem, weil der lästige "." im
> Seitenmenü zu sehen ist), funktioniert aber ausreichen gut. Anbei der Code
> im setup ...
>
> lg
> Manfred
>
>
> Dipl.-Ing. Manfred Widmann
>
>
> Brief:
>
> Leo-Fall-Str. 38, A-4600 Wels
>
>
> Tel.:
>
> 07242.54116
>
> 0699.10310619 (mobil)
>
>
> EMail:
>
> <mailto:mpunktw at gmx.net> mpunktw at gmx.net
>
>
> <mailto:your.teacher at gmx.net> your.teacher at gmx.net
>
>
> <mailto:passivhauswels at gmx.at> passivhauswels at gmx.at
>
>
> Home:
>
> <http://www.wima.at/> http://www.wima.at
>
>
> <http://www.myhtl.org/> http://www.myhtl.org
>
>
>
>
> ------------------------------------------------------------------------
>
> ################ Template Parser
> plugin.tx_automaketemplate_pi1 {
> # Read the template file:
> content = FILE
> content.file = fileadmin/template/main/design.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
> TD.all = 1
> }
>
> # Prefix all relative paths with this value:
> relPathPrefix = fileadmin/template/main/
> }
>
>
> ################ MenueTop cObject
> temp.menueTop = HMENU
>
> # First level menu-object, textual
> temp.menueTop.1 = TMENU
> temp.menueTop.1 {
> # Expand all levels
> expAll = 1
>
> # Define alternative sub-level rendering: all except the last one is handled by defaul; the last one by 2alt
> submenuObjSuffixes = |*| |*| alt
>
> # Comment out all normal state items:
> NO.allWrap = <!-- | -->
> NO.stdWrap.htmlSpecialChars = 1
>
> # Comment out even all active state items:
> ACT = 1
> ACT.allWrap = <!-- | -->
> ACT.stdWrap.htmlSpecialChars = 1
> }
>
> # Default second level menu-object, textual
> temp.menueTop.2 = TMENU
> temp.menueTop.2 {
> # Comment out normal state items
> NO.allWrap = <!-- | -->
> NO.stdWrap.htmlSpecialChars = 1
>
> # Comment out even all active state items
> ACT = 1
> ACT.allWrap = <!-- | -->
> ACT.stdWrap.htmlSpecialChars = 1
> }
>
> # Alternative second level menu-object for last first-level item: that's the one it's all for
> temp.menueTop.2alt = TMENU
> temp.menueTop.2alt {
> # Normal state properties
> NO.allWrap = <span class="menueTop">[ | ]</span>
> NO.stdWrap.htmlSpecialChars = 1
>
> # Enable active state and set properties:
> ACT = 1
> ACT.allWrap = <span class="menueTopAct">[ | ]</span>
> ACT.stdWrap.htmlSpecialChars = 1
> }
>
>
> ################ MenueLeft cObject
> temp.menueLeft = HMENU
>
> # First level menu-object, textual
> temp.menueLeft.1 = TMENU
> temp.menueLeft.1 {
> # Define alternative sub-level rendering: all except the last one is handled by defaul; the last one by 2alt
> submenuObjSuffixes = |*| |*| alt
>
> # Normal state properties
> NO.allWrap = <div class="menue1"> | </div>
> NO.stdWrap.htmlSpecialChars = 1
>
> # Enable active state and set properties:
> ACT = 1
> ACT.allWrap = <div class="menue1act"> | </div>
> ACT.stdWrap.htmlSpecialChars = 1
> }
>
> # Default second level menu-object: we do want have that!!!
> temp.menueLeft.2 = TMENU
> temp.menueLeft.2 {
> # Normal state properties
> NO.allWrap = <div class="menue2"> | </div>
> NO.stdWrap.htmlSpecialChars = 1
>
> # Enable active state and set properties:
> ACT = 1
> ACT.allWrap = <div class="menue2act"> | </div>
> ACT.stdWrap.htmlSpecialChars = 1
> }
>
> # Alternative second level menu-object for last first-level item: that's for nothing
> temp.menueLeft.2alt = TMENU
> temp.menueLeft.2alt {
> # Comment out normal state items
> NO.allWrap = <!-- | -->
> NO.stdWrap.htmlSpecialChars = 1
>
> # Comment out even all active state items
> ACT = 1
> ACT.allWrap = <!-- | -->
> ACT.stdWrap.htmlSpecialChars = 1
> }
>
> # Third level menu-object, textual
> temp.menueLeft.3 = TMENU
> temp.menueLeft.3 {
> # Normal state properties
> NO.allWrap = <div class="menue3"> | </div>
> NO.stdWrap.htmlSpecialChars = 1
>
> # Enable active state and set properties:
> ACT = 1
> ACT.allWrap = <div class="menue3act"> | </div>
> ACT.stdWrap.htmlSpecialChars = 1
> }
>
>
> ################ 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 ###menueTop### subpart with dynamic content:
> subparts.menueTop < temp.menueTop
> # -oder-
> #subparts.menueTop = TEXT
> #subparts.menueTop.value = HELLO WORLD - TopMenue
>
> # Substitute the ###menueLeft### subpart with dynamic menue:
> subparts.menueLeft < temp.menueLeft
>
> # Substitute the ###content### subpart with dynamic content:
> subparts.content < styles.content.get
> }
>
>
> ################ 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
More information about the TYPO3-ch
mailing list