Hallo,
also ich bin mit Hilfe diese und anderer Foren und Anleitungen schon ein ganzes Stück weit gekommen, allerdings stoße ich immer wieder auf neue Probleme.
Ich will die Spalten von Typo3 benutzen:
0 = NORMAL: Normaler Inhalt
1 = LINKS: Kurze Inhaltsblöcke
2 = RECHTS: Kurze Inhaltsblöcke
3 = RAND: Banner
Um das zu realisieren, habe ich die EXT:automaketemplate benutzt.
Da stand ich vor dem 1. Problem, die Spalten sollen alle ein unterschiedliches Layout haben, was ich 'fast' hinbekommen habe (funktioniert nur mit header und bodytext und ist imho unsauber gelöst).
Jetzt habe ich das Problem, dass ich in die Blöcke z.B. tt_poll einfügen möchte. In der Spalte NORMAL funktioniert alles so weit prima, in den Blöcken erhalte ich jedoch keinen Output. Was anscheinend daran liegt, dass ich den header und bodytext manuell wrappe.
Es muss doch eigentlich möglich sein, statt die Blöcke zu wrappen, eine Datei (block.tmpl) zu benutzen und und dort zwei Marker zu füllen (###HEADER### und ###REST_EGAL_WAS_ES_IST###).
Hat jemand eine Idee dazu?
Meine Scripte sehen wie folgt aus (vieles davon ist Copy'n'Paste):
MAIN_TMPL:
# ...
# Allgemeine Einstellungen wie z.B. Sprache, DocType, Logging, Realurl etc.
# ...
# Default PAGE object:
page = PAGE
page.typeNum = 0
page.10 < temp.mainTemplate
page.headerData.10 < temp.headTemplate
Includierte +ext Templates in der eingebundenen Reihenfolge:
Auto Parser:
# Template Auto-Parser
#
plugin.tx_automaketemplate_pi1 {
content = FILE
content.file = fileadmin/templates_1/main_layout.tmpl
# 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/templates_1/
}
blockRight:
# blockRight cObject
temp.blockRight = CONTENT
temp.blockRight < styles.content.getRight
temp.blockRight {
renderObj = COA
renderObj {
20 = CASE
20 {
key.field = header_layout
default = TEXT
default.field = header
default.wrap (
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/block_head_green_l.gif" width="8" height="15" alt="" /></td>
<td>|</td>
<td><img src="images/block_head_green_r.gif" width="8" height="15" alt="" /></td>
</tr>
)
1 = TEXT
1.field = header
1.wrap (
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/block_head_red_l.gif" width="8" height="15" alt="" /></td>
<td>|</td>
<td><img src="images/block_head_red_r.gif" width="8" height="15" alt="" /></td>
</tr>
)
}
30 = TEXT
30.field = bodytext
30.wrap (
<tr>
<td colspan="3" style="width: 8px;">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="blockContent">|</td>
</tr>
</table>
</td>
</tr>
</table>
)
}
renderObj.stdWrap.required = 1
}
skyScraper (RAND):
# Banner Konfiguration
#
temp.skyScraper < plugin.tx_macinabanners_pi1
temp.skyScraper {
# show banners with this attribute, options are: top, left, bottom, right
placement = right
#mode to show banners, options are: all, random
mode = random
# list of page ids where the banners should be taken from ( comma seperated f.E.: 1,5,7)
pidList = 35
# levels of recoursion to search for banners
recursive = 0
# Limit numeber of Banners
results_at_a_time = 1
}
Main Template:
# 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
}
# 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 ###menuMain### subpart with some example content:
subparts.menuMain < temp.menuMain
# Substitute the ###menuSub### subpart with some example content:
subparts.menuSub < temp.menuSub
# Substitute the ###contentMain### subpart with some example content:
subparts.contentMain < styles.content.get
subparts.columnLeft < temp.blockLeft
subparts.columnRight < temp.blockRight
# Substitute the ###skyScraper### subpart with some example content:
subparts.skyScraper < temp.skyScraper
}