Zum Inhalt springen

Body Tag - FFFFF geht nicht weg

Erstellt am 13. September 2003 · 2 Antworten · letzte Antwort am 15. September 2003

Tags: Frage

Martin Egger ·

Hallo Miteinander

Ich sitze nun schon einige Stunden davor und begreife nicht warum der Body Tag immer automatisch generiert wird, ohne das ich irgendwas angegeben habe. Das lustige ist aber das ich werde im Stylesheet noch direkt im Template was ändern kann.

Im Template Tool kann ich zwar auch den Header beeinflussen aber ein Hintergrundbild ist einfach nicht möglich.

Ich habe zuvor das Tutorial über Modern Template Building Part1 angewendet.

Wäre echt froh um eine schnelle hilfe 🙂. cheers

downset ·

Also ehrlich gesagt verstehe ich net genau was Du meinst aber versuchen wir es mal:

1. Hast Du mal geschaut, was im HTML-Template steht?
2. Stylesheet ändern
3. Caches löschen und Seite aktualisieren.

Wenn es daran net liegt, bitte Problem etwas genauer beschreiben (ersten Absatz verstehe ich so nicht ganz)

Gruß

Martin Egger ·

Das Problem hat sich gelöst.

Das Problem ist, das wenn ich ein neues Template erstelle und nach dem Tutorial Modern Template Building Part1 gehe, das nach dem gleich aufführen den Code, der Body-Tag immer auf FFFFF steht.

Was ich jetzt weiss ist, das man auch im TypoScript Bereich den Body definieren kann, das ändert aber nix am Hintergrund. Ich habe jetzt einfach im Stylesheet einen Hintergrund als Farbe definiert und im TypoScript ein Hintergrund mit Bild definiert und dann geht es. Aber ich glaube wirklich das es da eine einfachere und effinzientere Lösung gibt. Hier einmal der ganze Code den ich benütze:

# Configuring the Auto-Parser:
plugin.tx_automaketemplate_pi1 {
    # Read the template file:
  content = FILE
  content.file = fileadmin/template/main/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/main/
}

# 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 dynamic menu:
  subparts.menu_1 < temp.menu_1
 
    # Substitute the ###content### subpart with some example 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
page.bodyTag= <body background = "fileadmin	emplatemainkachel2.jpg">
 
# Copying the content from TEMPLATE for <body>-section:
page.11 < temp.mainTemplate

# Copying the content from TEMPLATE for <head>-section:
page.headerData.11 < temp.headTemplate