[TYPO3-UG Denmark] Lidt hjælp til : Modern Template Building, Part 1
Simon Rothenborg
simon at dogg.dk
Tue Mar 14 11:16:59 CET 2006
Hej igen,
Det synes jeg, jeg har prøvet - men det vil ikke virke. Sikkert bare mig der
laver en eller andet tumpet fejl.
Mit setup felt ser nu samlet sådan her ud :
# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
# Read the template file:
content = FILE
content.file = fileadmin/template/template_1.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/
}
# 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-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 some example content:
subparts.menu_1 = TEXT
subparts.menu_1.value = HELLO WORLD - MENU
# Substitute the ###content### subpart with some example content:
subparts.content = TEXT
subparts.content.value = HELLO WORLD - CONTENT
}
# 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
´
/Simon Rothenborg
"Brian Bendtsen" <brb at mentor-it.dk> skrev i en meddelelse
news:mailman.1.1142326935.20834.typo3-ug-denmark at lists.netfielders.de...
> Simon Rothenborg wrote:
>> Hejsa,
>>
>>
>> Det er muligt at dette har været oppe og vende før, men har ikke lige
>> kunne finde det. Så håber nogen kan hjælpe.
>>
>> Jeg er i gang med Modern Template Building, Part 1 (som i nok kunne regne
>> ud)
>>
>> Dette hele virker også fint, lige ind til jeg skal have menuen til at
>> virke. Hvilket irriterer meget noget da det står det er "extremely easy"
>> :)
>>
>> Men kan ikke finde ud af hvor jeg skal sætte dette ind, beklager hvis det
>> er at alt for dumt spørgsmål (har ikke helt styr på det endnu)
>>
>>
>> # Menu 1 cObjecttemp.menu_1 = HMENU # First level menu-object,
>> textualtemp.menu_1.1 = TMENUtemp.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,
>> textualtemp.menu_1.2 = TMENUtemp.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>}med venlig hilsenSimon Rothenborg
> Hej
>
> Det skal sættes ind i dit Setup felt for din template.
>
> Vælg template->Root page(eller hvad du nu kalder den)->click here to edit
> whole template record-> Her er dit setup felt.
>
> /Brian Bendtsen
More information about the TYPO3-UG-denmark
mailing list