[Typo3-german] autoparser und stylesheet per Template

Matthias Voigt matthias.voigt at web.de
Fri Jul 22 10:16:17 CEST 2005


Hallo Newsgroup!

Habe eine Website mit T3 gemacht. Klappt auch sowit alles super. Für das
Template verwende ich den Template autoparser. Zur Zeit ist das Stylesheet
noch hardgecodet im Templatefile, doch das soll sich ändern. Geplant ist
eine autom. umschaltung des Stylesheet, abhängig von der gewählten Sprache
(wegen der Schriftart).
Doch um das zu realisieren muss ich T3 erstmal dazu bringen, überhaupt das
stylesheet per TS im Template zu nehmen. Geht aber nicht. Hier mein Setup
Code:

<<<<<<<<<<------------------->>>>>>>>>>>>>>>>>>

# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
    # Read the template file:
  content = FILE
  content.file = {$templatefile}

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

    DIV.all = 1
    TD.all = 1
  }
  # Prefix all relative paths with this value:
  relPathPrefix = {$relPath}
}

# 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

  marks.tipafriend < temp.tip
  marks.searchbox >
  marks.searchbox < plugin.tx_macinasearchbox_pi1
#  subparts.tabs < temp.tabsmenu
  subparts.mainmenu < temp.mainmenu
  subparts.topmenu < temp.topmenu
  subparts.maincontent < styles.content.get
  subparts.rightContent < styles.content.getRight
  subparts.rootline < temp.rootlinemenu
  subparts.lastupdate < styles.content.lastupdate
  subparts.languagemenu < temp.languagemenu
  marks.metas_html < temp.metas_html

subparts.lastupdate = TEXT
subparts.lastupdate {
 data= page:lastUpdated
 if.isTrue.Data = page:lastUpdated
  date=d.m.Y
  wrap = Page updated:&nbsp;|
  data=register:SYS_LASTCHANGED
if >
}
}


# 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

####################### HIERUM GEHTS ###########
page.stylesheet = fileadmin/ecmigeorgia.tpl/site-geo.css

# 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

<<<<<<<<<<------------------->>>>>>>>>>>>>>>>>>

Habe die Zeile schon an verschiedenen Stellen gehabt.
Kann mir einer sagen, was ich falsch mache?

Danke

Matthias



More information about the TYPO3-german mailing list