Hallo zusammen,
ich habe ein - hoffentlich - recht einfaches Problem ... ;-)
Im Template-Setup binde ich derzeit in allen Seiten den Content einer anderen Seite ein:
# 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:
subparts.contents < styles.content.get
subparts.contents {
renderObj.stdWrap.wrap = {$ContentWrapperBegin} | {$ContentWrapperEnd}
}
# CSS classes
subparts.cssleftcontent = TEXT
subparts.cssleftcontent.value = {$CSSLEFTCONTENT} {$LEFTDISPLAYSTYLE}
subparts.cssrightcontent = TEXT
subparts.cssrightcontent.value = {$CSSRIGHTCONTENT} {$RIGHTDISPLAYSTYLE}
# include news
subparts.newscontent = CONTENT
subparts.newscontent {
table = tt_content
select.pidInList = 6
renderObj.stdWrap.wrap = {$ContentWrapperBegin} | {$ContentWrapperEnd}
}
}
Genau genommen geht es hier also um den Bereich unterhalb des Kommentars # include news, der nur für bestimmte Seiten ausgeführt werden soll:
subparts.newscontent = CONTENT
subparts.newscontent {
table = tt_content
select.pidInList = 6
renderObj.stdWrap.wrap = {$ContentWrapperBegin} | {$ContentWrapperEnd}
}
Für die Seite mit der pid = 6 möchte ich diese News aber nicht mehr auslesen, da ich mich dann ja auf der Newsseite befinde. ;-)
Allerdings habe ich es noch geschafft, eine entsprechende if-Anweisung umzusetzen. Kann mir hier jemand helfen ?
Schön wäre dabei auch, wenn im Setup nicht direkt die aktuelle pid ausgewertet, sondern eine im Konstantenbereich definierte Konstante, also z.B.:
[globalVar = TSFE:id = 5]
# include News-Teaser ?
SHOW_NEWS_TEASER = 1
[global]
[globalVar = TSFE:id = 6]
# include News-Teaser ?
SHOW_NEWS_TEASER = 0
[global]
Kann mir hier jemanden weiterhelfen ?