Zum Inhalt springen

Extensiontemplate erstellen

Erstellt am 9. Oktober 2006 · 1 Antwort · letzte Antwort am 11. Oktober 2006

Tags: Frage

hagily ·

Hallo!

Ich habe ein Template mit dem TypoScript

# Configuring the Auto-Parser for main template:

plugin.tx_automaketemplate_pi1 {

    # Read the template file:

  content = FILE

  content.file = fileadmin/template/index.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/

}

# 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 ###content### subpart with some example content:
    
    subparts.content < styles.content.get
    
    subparts.b_home = TEXT
    subparts.b_home {
	value = <img src="fileadmin/template/images/b_home.jpg" width="69" height="36" border="0" />
	wrap = <a href="index.php?id=6"> | </a>
    }
    
    subparts.b_about = TEXT
    subparts.b_about {
	value = <img src="fileadmin/template/images/b_about.jpg" width="94" height="36" border="0" />
	wrap = <a href="index.php?id=5"> | </a>
    }
    
    subparts.b_ref = TEXT
    subparts.b_ref {
	value = <img src="fileadmin/template/images/b_ref.jpg" width="103" height="36" border="0" />
	wrap = <a href="index.php?id=4"> | </a>
    }
    
    subparts.b_service = TEXT
    subparts.b_service {
	value = <img src="fileadmin/template/images/b_service.jpg" width="93" height="36" border="0" />
	wrap = <a href="index.php?id=3"> | </a>
    }
    
    subparts.b_contact = TEXT
    subparts.b_contact {
	value = <img src="fileadmin/template/images/b_contact.jpg" width="87" height="36" border="0" />
	wrap = <a href="index.php?id=2"> | </a>
    }

}

# 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
{
stylesheet = fileadmin/template/style.css
}


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

.

Jetzt weiß ich aber nicht, was ich im Setupfeld für das Extension Template eingeben muss, dass die Templateseite von index.html in ref.html geändert werden muss.
Ich habe es mit

plugin.tx_automaketemplate_pi1 {

    # Read the template file:

  content = FILE

  content.file = fileadmin/template/index.html

probiert aber das funktioniert nicht.

Was mache ich Falsch?

Felix