Zum Inhalt springen

Wraps um Inhaltselemente in bestimmter Spalte packen

Erstellt am 11. April 2003 · 1 Antwort · letzte Antwort am 22. April 2003

Tags: Inhaltselemente, Frage

sacha ·

Hi,

mittlerweile habe ich eine umfangreiche Sammlung von TS-Schnippseln aber richtig kapiert habe ich das System und die Objekte immer noch nicht :-(.

Zur Zeit versuche ich (bzw. jemand dem ich dabei helfe) allen Inhaltselementen der "normalen" Spalte einen Wrap zu verpassen.

Auf typo3.org habe ich in einem Userkommentar folgenden Code gefunden:

my.box = CASE
my.box.key.field = colPos
my.box.default < tt_content.text
my.box.default {
   10.wrap = <div class="normal-header"> | </div>
   20.wrap = <div class="normal-text"> | </div>
}

my.box.1 < tt_content.text
my.box.1 {
   10.wrap = <div class="left-header"> | </div>
   20.wrap = <div class="left-text"> | </div>
}

my.box.2 < tt_content.text
my.box.2 {
   10.wrap = <div class="right-header"> | </div>
   20.wrap = <div class="right-text"> | </div>
}

tt_content.text >
tt_content.text < my.box

tt_content.textpic >
tt_content.textpic < my.box

tt_content.html >
tt_content.html < my.box

soweit ich das verstehe, bekommen hier einzelne Bestandteile eines Inhaltselemntes (Ueberschrift und Text) je nachdem in welcher Spalte sie stehen einen Wrap.

Kann mir jemand erklaeren, wie ich den Code so abaendern kann, dass die Inhaltselemente der normalen Spalte (und zwar nur diese) einen bestimmten Wrap bekommen?

Also z. B. das ein normales Text-Inhaltselement mit einer Tabelle umgeben wird.

Geht das mit dem o. a. Code?

Danke und Ciao,

Sacha

sacha ·

Hi,

dank Mailingliste habe ich eine Loesung gefunden:

temp.contentbox = CASE
temp.contentbox.key.field = colPos
temp.contentbox.default < tt_content.text
temp.contentbox.default {
    10.wrap >
    20.wrap >
    wrap = begin_tablecode_contentbox_column1<br /> | 
end_tablecode_contentbox_column1<br />
}

temp.contentbox.1 < tt_content.text
temp.contentbox.1 {
    10.wrap >
    20.wrap >
       wrap = begin_tablecode_contentbox_column2<br /> | 
end_tablecode_contentbox_column2<br />
}

temp.contentbox.2 < tt_content.text
temp.contentbox.2 {
    10.wrap >
    20.wrap >
    wrap = begin_tablecode_contentbox_column3<br /> | 
end_tablecode_contentbox_column3<br />
}

tt_content.text >
tt_content.text < temp.contentbox

tt_content.textpic >
tt_content.textpic < temp.contentbox

tt_content.html >
tt_content.html < temp.contentbox

temp.menubox = CASE
temp.menubox.key.field = colPos
temp.menubox.default < tt_content.menu
temp.menubox.default {
    10.wrap >
    20.wrap >
    wrap = begin_tablecode_menubox_column1<br /> | 
end_tablecode_menubox_column1<br />
}

tt_content.menu >
tt_content.menu < temp.menubox

temp.bulletbox = CASE
temp.bulletbox.key.field = colPos
temp.bulletbox.default < tt_content.bullets
temp.bulletbox.default {
    10.wrap >
    20.wrap >
    wrap = begin_tablecode_bulletbox_column1<br /> | 
end_tablecode_bulletbox_column1<br />
}

tt_content.bullets >
tt_content.bullets < temp.bulletbox

Bei der HTML-Ausgabe von Extensions muss man den Wrap aber noch ergaenzen.

Ciao,

Sacha