Zum Inhalt springen

rlmp_tmplselect (argh)

Erstellt am 13. Oktober 2005 · Noch keine Antworten

Tags: Frage

Gsicht ·

Tach

Ich versuche seit Ewigkeiten, diese Extension richtig zum Laufen zu bringen. Trotz verschiedener Tutorials kriege ich es nicht hin, dass die Auswahl der Subtemplates auch einen Effekt hat. Was mir klar ist (und auch funktioniert) ist das Einlesen der Templates, die zur Verfügung stehen sollen. Wenn ich nun aber subtemplate_1 oder subtemplate_2 auswähle, werden die nicht geladen. Zusätzlich will ich auch noch erreichen, dass in einem Template einspaltiger Content ist und im Anderen zweispaltiger.

Hier ist mein TS-Code:

// --- SET UP TEMPLATE SELECTOR -----------------------------------------------

plugin.tx_rlmptmplselector_pi1 {

// Define the paths leading to our HTML template files
templatePathMain = fileadmin/templates/
templatePathSub = fileadmin/templates/sub/

// Define the filenames used as the default HTML templates
defaultTemplateFileNameMain = Temp.html
defaultTemplateFileNameSub = einspaltig.html

// If there is a page having no template selected, use a template
// selected earlier in the rootline. If there is none, use the default
inheritMainTemplates = 1
inheritSubTemplates = 1

#######################################

# Template type. Default is "main". Allowed values: "main", "sub"
templateType = main

# Refers to the default template object to use
# if no value is set for the current page
defaultTemplateObjectMain = 10
defaultTemplateObjectSub = 10


# Contains TEMPLATE objects for TS mode (vs. external HTML file mode)
templateObjects.main =
templateObjects.sub =


}


// --- CONFIGURE THE AUTOMAKETEMPLATE EXTENSION --------------------------

plugin.tx_automaketemplate_pi1 {

content < plugin.tx_rlmptmplselector_pi1
elements {
BODY.all = 1
BODY.all.subpartMarker = DOCUMENT_BODY

HEAD.all = 1
HEAD.all.subpartMarker = DOCUMENT_HEADER
HEAD.rmTagSections = title

TD.all = 1
DIV.all = 1
}

relPathPrefix = fileadmin/templates/
}



// --- CREATE TS TEMPLATES FOR MAIN AND CONTENT AREA ------------------

temp.headTemplate = TEMPLATE
temp.headTemplate {
template =< plugin.tx_automaketemplate_pi1
workOnSubpart = DOCUMENT_HEADER
}

temp.contentAreaTemplate = TEMPLATE
temp.contentAreaTemplate {

template =< plugin.tx_automaketemplate_pi1

// Modify the template selector config: This is a sub template!
template.content.templateType = sub

workOnSubpart = DOCUMENT_BODY
subparts.content < styles.content.get
}

temp.mainTemplate = TEMPLATE
temp.mainTemplate {

template =< plugin.tx_automaketemplate_pi1

// Modify the template selector config: This is a main template!
template.content.templateType = main
template.content.templateType = fileadmin/templates/main/template_1.html


workOnSubpart = DOCUMENT_BODY
subparts.content-normal < temp.contentAreaTemplate
}



#MENUS...  -------------------------------------------
#[...]



 
temp.mainTemplate.subparts.content = CONTENT
temp.mainTemplate.subparts.content.table = tt_content
temp.mainTemplate.subparts.content.select.pidInList = this
temp.mainTemplate.subparts.content.select.orderBy = sorting
temp.mainTemplate.subparts.content.select.where = colPos=0
temp.mainTemplate.subparts.content.select.languageField=sys_language_uid

temp.mainTemplate.subparts.content-right = CONTENT
temp.mainTemplate.subparts.content-right.table = tt_content
temp.mainTemplate.subparts.content-right.select.pidInList = this
temp.mainTemplate.subparts.content-right.select.orderBy = sorting
temp.mainTemplate.subparts.content-right.select.where = colPos=2
temp.mainTemplate.subparts.content-right.select.languageField=sys_language_uid


page.stylesheet = fileadmin/templates/bnstyle.css
page.shortcutIcon = fileadmin/templates/favicon.ico

page.bodyTag  =   <body background="/fileadmin/pics/wallpaper.gif" marginheight="0" topmargin="0" vspace="0" marginwidth="0" leftmargin="0" hspace="0" style="margin:0">
page.target = _top



page = PAGE
page.typeNum = 0
page.20 < temp.mainTemplate 
page.20.target = _top

config.simulateStaticDocuments = 1
config.simulateStaticDocuments_noTypeIfNoTitle = 1
config.index_enable = 1
config.enable_externals = 1
config.language = de

lib.stdheader.5.wrap = |:<br />
lib.stdheader.10.1.fontTag=<b>|</b>
lib.stdheader.10.2.fontTag=<b>|</b>
lib.stdheader.10.3.fontTag=<b>|</b>
lib.stdheader.10.4.fontTag=<b>|</b>

Hier ist der Code des einen Subtemplates:

<table border="0" cellpadding="0" cellspacing="0">
    <tr>
        <font color="green"><td id="content">###CONTENT_LEFT###</td></font>
        <td><img src="/fileadmin/pics/pixel.gif" width="5" alt="" /></td>
        <td id="content-right">###CONTENT_RICHT###</td>
    </tr>
    <tr>
        <td>zweispaltiges Template</td>
    </tr>
</table>

Kann mir da jemand auf die Sprünge helfen?

Danke im Voraus 🙂

-Gsicht