[TYPO3-german] verschiedene Templates

Basti sebastian.schmal at gmx.de
Tue Jul 1 15:45:08 CEST 2008


Hi,

hätte da noch einen anderen weg:

[treeLevel = 0,1,2,3]



so hab ich das mal gemacht:

# ---------------------
# Configuring the Auto-Parser for main template:
# ---------------------

[treeLevel = 0,1,2,3]

plugin.tx_automaketemplate_pi1 {

   content = FILE
   content.file = fileadmin/templates/index.html
   elements {
     BODY.all = 1
     BODY.all.subpartMarker = DOCUMENT_BODY
     HEAD.all = 1
     HEAD.all.subpartMarker = DOCUMENT_HEADER
     HEAD.rmTagSections = title
     DIV.all = 1
     #SPAN.all = 1
     #TD.all = 1
   }
   relPathPrefix = fileadmin/templates/
}


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

   subparts.head_navi < temp.headnavi
   subparts.navi < temp.menu
   subparts.content_bg_pic < temp.headpic
   subparts.rootline < temp.mypath
   subparts.submenu_wrap < temp.submenu
   subparts.left_box < temp.info_box
   subparts.left_box_bottom < temp.info_box_bottom
   subparts.left_box_bottom_print < lib.printlink
   subparts.content < styles.content.get
   subparts.fusstext < temp.fusstext
}


page.headerData.10  < temp.headTemplate

[else]


# ---------------------
# PRODUKT-MENU
# ---------------------

temp.produkt_menu = HMENU
temp.produkt_menu {

   # Eingangslevel
     entryLevel = 4
     noBlur = 1

       # First level menu-object, textual
         1 = TMENU
         1.wrap = |

       # Normal state properties
         1.NO = 1
         1.NO{
          linkWrap = <div>|</div>
         }

       # Enable active state and set properties:
         1.ACT = 1
         1.ACT{
          linkWrap = <div class="produkt_menu_act">|</div>
         }

         1.CUR = 1
         1.CUR{
          linkWrap = <div class="produkt_menu_act">|</div>
         }
       }


# ---------------------
# Configuring the Auto-Parser for main template:
# ---------------------

plugin.tx_automaketemplate_pi1 {
   content = FILE
   content.file = fileadmin/templates/index_produkte.html
   elements {
     BODY.all = 1
     BODY.all.subpartMarker = DOCUMENT_BODY
     HEAD.all = 1
     HEAD.all.subpartMarker = DOCUMENT_HEADER
     HEAD.rmTagSections = title
     DIV.all = 1
     #SPAN.all = 1
     #TD.all = 1
   }
   relPathPrefix = fileadmin/templates/
}


# ---------------------
# Main TEMPLATE cObject for the BODY
# ---------------------


temp.mainTemplate2 = TEMPLATE
temp.mainTemplate2 {
   # 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

   subparts.head_navi < temp.headnavi
   subparts.navi < temp.menu
   subparts.content_bg_pic < temp.headpic
   subparts.rootline < temp.mypath
   subparts.submenu_wrap < temp.submenu
   subparts.left_box < temp.info_box
   subparts.left_box_bottom < temp.info_box_bottom
   subparts.left_box_bottom_print < lib.printlink
   subparts.produkt_menu < temp.produkt_menu
   subparts.content_produkte < styles.content.get
   subparts.fusstext < temp.fusstext
}


# ---------------------
# Default PAGE object:
# ---------------------

page = PAGE
page.typeNum = 0
# Copying the content from TEMPLATE for <body>-section:
page.10 < temp.mainTemplate2


[end]

Teubner schrieb:
> So, ich bin nun einen Schritt weiter und es funktioniert auch schon fast.
> Aber eben auch nur fast.
> Wenn ich bei den letzten Globals für die 2. Ebene mehr als eine ID 
> angebe, wird, nachdem ich auf eine andere Seite klicke, nicht mehr das 
> Template verwendet, welches unter der globalVar definiert wurde, sondern 
> nur noch das, welches für Ebene 2 vorgesehen ist.
> 
> Woran kann das bitte liegen?
> 
> [globalVar = TSFE:id = 3] # Template fürs Root
>  page.10.template.file = fileadmin/templates/start_template.html
>  page.includeCSS.file1 = fileadmin/templates/css.css
> [global]
> [globalVar = TSFE:id = 5,6,7,8,9,10,11,12] #Template für Ebene 1
>  page.10.template.file = fileadmin/templates/template.html    
>  page.includeCSS.file1 = fileadmin/templates/css.css
> [global]
> [globalVar = TSFE:id = 22,23] #Template für Ebene2
>  page.10.template.file = 
> fileadmin/templates/template_unterseiten.html     page.includeCSS.file1 
> = fileadmin/templates/unterseite_css.css
> [global]    # Default PAGE object:
> page = PAGE
> page {
>  includeCSS {
>    file1.media = all
>  }
>  shortcutIcon = fileadmin/templates/images/favicon.ico       10 = TEMPLATE
>  10.template = FILE
>  10 {     workOnSubpart = DOCUMENT_BODY
>    subparts {
>      CONTENT < styles.content.get
> ...

-- 
------------------------------------------

TYPO3 - TIPS - ANLEITUNGEN - NEWS - TYPO3

unter: http://blog.ingeniumdesign.de/

------------------------------------------


More information about the TYPO3-german mailing list