Mein Verständnis:
HTML-Vorlage enthält u.a.:
<!-- ###NORMAL### -->
Text ...
###MARKER###
<!-- ###NORMAL### -->
..
Ins Typoscript schreibe ich:
page.10.subparts {
NORMAL < styles.content.get
NORMAL.wrap = <div id="normal">###MARKER### | </div>
substMarksSeparately = 1
}
page.10.marks.MARKER = <h1>Hallo!!!</h1>
So, nun war ich der Meinung und der guten Hoffnung, dass im HTML-Code der Seite das stünde:
...
<div id="normal"><h1>Hallo!!!</h1>
... Inhalt aus Spalte NORMAL ...
</div>
Es steht aber das im Code:
...
<div id="normal">###MARKER###
... Inhalt aus Spalte NORMAL ...
</div>
Ich fürchte, ich habe das Thema nicht ganz verstanden oder weiß jemand Rat, wo der "Hase im Pfeffer" liegt?
Habe gegoogelt wie jeck aber leider keine brauchbare, verständliche Erklärung evtl. mit Beispiel gefunden, meistens nur das was dazu im TSREF steht.
Hallo Kurt51,
Kurt51 schrieb
page.10.marks.MARKER = <h1>Hallo!!!</h1>
probier das hier mal aus:
page.10.subparts.NORMAL.marks {
MARKER = TEXT
MARKER.value = <h1>Hallo!!!</h1>
}
Grüße Patrick
Hallo Patrick,
hast Du das mal ausprobiert?
Bei mir erhalte ich weiterhin den Marker ###MARKER### ausgegeben und nicht "Hallo!!!" !? o.O
Hallo Kurt51,
Kurt51 schrieb
hast Du das mal ausprobiert?
Bei mir erhalte ich weiterhin den Marker ###MARKER### ausgegeben und nicht "Hallo!!!" !? o.O
Ich habs mal schnell ausprobiert. Du hast substMarksSeparately an der falschen Stelle, denn das ist eine Option von TEMPLATE, das muss da hin, wo dein Template auch definiert wird.
Bei meinem Test hat das so ausgeschaut:
subparts.DOC_CONTENT = TEMPLATE
subparts.DOC_CONTENT {
substMarksSeparately = 1 # hier muss das hin!
template = FILE
...
}
Dann funktionierts auch.
Grüße Patrick
king.darki schrieb
Bei meinem Test hat das so ausgeschaut:
subparts.DOC_CONTENT = TEMPLATE
subparts.DOC_CONTENT {
substMarksSeparately = 1 # hier muss das hin!
template = FILE
...
}
Dann funktionierts auch.
Kann es sein, dass Du mit TV arbeitest?
Bei mir steht im Setup nur das:
page.10 = TEMPLATE
page.10.template = FILE
page.10.template.file = vorlage.html
und wenn ich hier dann noch anfüge:
page.10.substMarksSeparately = 1
dann klappt es auch nicht. - Es ist zum Verzweifeln! #angry#
Ich habe es so versucht:
page.10.workOnSubpart = BODY_CONTENT
page.10.subparts.BODY_CONTENT = TEMPLATE
page.10.subparts.BODY_CONTENT.substMarksSeparately = 1
page.10.subparts.NORMAL = TEMPLATE
page.10.subparts.NORMAL.substMarksSeparately = 1
page.10.subparts {
NORMAL >
NORMAL < styles.content.get
# NORMAL.substMarksSeparately = 1
NORMAL.stdWrap.wrap = <div id="col3"><div id="col3c">+++ ###MARKER### +++<br />|</div></div>
}
page.10.subparts {
NORMAL.marks {
MARKER = TEXT
MARKER.value = <h1>Hallo Marker!!!</h1>
}
}
Kurt51 schrieb
Kann es sein, dass Du mit TV arbeitest?
Nein kein TV, sondern rlmptmplselector.
Aber da rlmptmplselector genauso mit Subparts und Markern funktioniert, sollte es eigentlich keinen Unterschied bei dir machen...
Kurt51 schrieb
Bei mir steht im Setup nur das:
page.10 = TEMPLATE
page.10.template = FILE
page.10.template.file = vorlage.html
page.10.substMarksSeparately = 1
Hast du evtl. tiefer nochmal etwas als TEMPLATE definiert? Z. B. dein Subpart "NORMAL"?!
Hier hab ich für dich mal das gesamte TS, mit welchem es bei mir einwandfrei funktioniert hat:
page = PAGE
page {
10 = TEMPLATE
10 {
template = FILE
template < plugin.tx_rlmptmplselector_pi1
template.templateType = main
workOnSubpart = DOC_BODY
subparts.DOC_CONTENT = TEMPLATE
subparts.DOC_CONTENT {
substMarksSeparately = 1
template = FILE
template < plugin.tx_rlmptmplselector_pi1
template.templateType = sub
}
}
}
page.10 {
subparts.DOC_CONTENT {
marks {
CONTENT < styles.content.get
CONTENT.wrap = <div>###TEST###</div>|
TEST = TEXT
TEST.value = <h1>Hallo</h1>
}
}
}
Wenns immer noch nicht klappt, kannst du ja auch gern dein gesamtes TS mir per PN schicken oder hier posten.
Grüße Patrick
page.10.subparts {
# NORMAL.marks { <- hier hab ich den Body-Subpart verwendet
# probier es mal so:
BODY_CONTENT.marks {
MARKER = TEXT
MARKER.value = <h1>Hallo Marker!!!</h1>
}
}
Grüße Patrick
Hallo Patrick,
Danke für Deine Mühen.
Nach einigem Experimentieren klappt es nun so:
page.10.substMarksSeparately = 1
page.10.subparts {
NORMAL < styles.content.get
NORMAL.wrap = <div id="col3">###MARKER### | </div>
}
page.10.marks {
MARKER = TEXT
MARKER.value = <h1>Hallo Marker!!!</h1>
}