Zum Inhalt springen

was ist an dem skript falsch??

Erstellt am 16. August 2004 · 4 Antworten · letzte Antwort am 16. August 2004

Tags: Frage

l00P ·

hallo zusammen.

Bin grade am einrichten eines neuen templates. ich verwende zum testen das template das im tutorial "modern template building zu sehen ist.

ich füge auch den text für setupfeld aus dem tutorial ein, aber ich bekomme keine Ausgabe. was ist daran nur falsch. mit einem kleineren skript hats schon funktioniert, pfade und so weiter stimmen also. vielleicht ist das eine blöde frage, kann mir aber vorstellen das jemand den fehler sehen kann wenn er draufkuckt. hier als das skript. 😃

: wenn ich mir den sourcecode in der ausgabe ansehe, wird die seite schon generiert aber der body teil ist vollkommen leer !!!

PS: ich verwende auch den auto-template-parser...

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

}


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

ein bißchen korrekte syntax sollte schon sein... 😉

die geschweiften klammern dürfen nicht am anfang einer zeile stehen, das is erstmal alles.
deinen code hab ich mir nicht durchgelesen.

dieses muster ist richtig

plugin.tx_automaketemplate_pi1 {
# Read the template file: 
content = FILE 
content.file = fileadmin/main/template_1.html
...
l00P ·

es geht auch nicht wenn die klammern nicht in der ersten zeile stehen.

ich weiß mit dem kleineren skript funktionierts auch, jetzt wollte ich aber dynamische inhalte einfügen, deshalb das große, aber aus irgend einem grund geht das nicht, vielleicht weiß ja doch einer bescheid.

danke trotzdem,

l00P

l00P ·

ja ich weiß 😃

hast du vielleicht ein einfaches skript das die seite ganz normal anzeigt wie sie ist und ein einfaches beispiel für grafisches menü und dynamischem mittelteil??

Das beispiel vom modern template building funktioniert anscheinend nicht....

wäre echt super, kenn mich nich nicht so toll aus in typo script.

lg,
l00P