Einen Rahmen um alle Seitenelemente legen
Wenn ein Rahmen um jedes Seitenelement wie Text, Text mit Bild,Tabelle, ... generiert werden soll, müssen die folgenden Zeile in's TypoScript (Setup):
TypoScript (Setup):
- tt_content.stdWrap.wrap (
- <table border="1">
- <tr>
- <td>|</td>
- <tr>
- </table>
- )
Rahmen mit CSS
Anstatt der Tabelle kann man natürlich auch ein div-Tag benutzen. Dies hätte den Vorteil, daß die Inhalte für z.B. die Normal- und die Rand-Spalte unterschiedlich ausgegeben werden könnten. Dazu müssten nur die Marker für die Inhalte mit unterschiedlichen CSS-ID's versehen werden:
Beispiel:
- <div id="content-normal">###CONTENT_NORMAL###</div>
- <div id="content-margin">###CONTENT_MARGIN###</div>
Mit der folgenden Zeile umschließt man nun alle Inhaltselemente mit einem div-Tag. Da auf einer Seite mehrere Elemente sein können, muss nun eine Klasse anstatt einer ID verwendet werden:
TypoScript (Setup)
- tt_content.stdWrap.wrap = <div class="content-element">|</div>
Sie können nun mit CSS zuerst die ID und dann die Klasse, die jedes Seitenelement umschließt, für die beiden Marker getrennt ansprechen:
CSS-Beispiel:
color: blue;
border: 1px solid #666666;
}
#content-margin .content-element h1 {
color: green;
}
Kommentare von registrierten Benutzern:
[TYPOSCRIPT]
| Html4strict: | Zeilennummerierung: An / Aus |
Javascript: Zeilennummerierung: An / Aus - <div class='tx-geshi-pi1'><style type="text/css">
- <!--/* GeSHi (c) Nigel McNie 2004 (http://qbnz.com/highlighter) */
- .php .de1, .php .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
- .php .imp {font-weight: bold; color: red;}
- .php li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;background: #EEEEEE;}
- .php .kw1 {color: #b1b100;}
- .php .kw2 {color: #000000; font-weight: bold;}
- .php .kw3 {color: #000066;}
- .php .co1 {color: #808080; font-style: italic;}
- .php .co2 {color: #808080; font-style: italic;}
- .php .coMULTI {color: #808080; font-style: italic;}
- .php .es0 {color: #000099; font-weight: bold;}
- .php .br0 {color: #66cc66;}
- .php .st0 {color: #ff0000;}
- .php .nu0 {color: #cc66cc;}
- .php .me1 {color: #006600;}
- .php .me2 {color: #006600;}
- .php .re0 {color: #0000ff;}
- -->
- </style><div class="tx-geshi-pi1">
- <table width="100%"><tr><td align="left"><strong>Php:</strong></td><td align="right">Zeilennummerierung:
- <strong>An</strong> /
- <a href="index.php?id=34&action=list_post&code_numbering=0&tid=&page=">Aus</a></td></tr></table></div><div class="php"><ol><li> </li></ol></div></div>
/TYPOSCRIPT]
[TYPOSCRIPT]
| Html4strict: | Zeilennummerierung: An / Aus |
Javascript: Zeilennummerierung: An / Aus - <div class='tx-geshi-pi1'><style type="text/css">
- <!--/* GeSHi (c) Nigel McNie 2004 (http://qbnz.com/highlighter) */
- .php .de1, .php .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
- .php .imp {font-weight: bold; color: red;}
- .php li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;background: #EEEEEE;}
- .php .kw1 {color: #b1b100;}
- .php .kw2 {color: #000000; font-weight: bold;}
- .php .kw3 {color: #000066;}
- .php .co1 {color: #808080; font-style: italic;}
- .php .co2 {color: #808080; font-style: italic;}
- .php .coMULTI {color: #808080; font-style: italic;}
- .php .es0 {color: #000099; font-weight: bold;}
- .php .br0 {color: #66cc66;}
- .php .st0 {color: #ff0000;}
- .php .nu0 {color: #cc66cc;}
- .php .me1 {color: #006600;}
- .php .me2 {color: #006600;}
- .php .re0 {color: #0000ff;}
- -->
- </style><div class="tx-geshi-pi1">
- <table width="100%"><tr><td align="left"><strong>Php:</strong></td><td align="right">Zeilennummerierung:
- <strong>An</strong> /
- <a href="index.php?id=34&action=list_post&code_numbering=0&tid=&page=">Aus</a></td></tr></table></div><div class="php"><ol><li> </li></ol></div></div>
/TYPOSCRIPT]
[TYPOSCRIPT]
| Html4strict: | Zeilennummerierung: An / Aus |
Javascript: Zeilennummerierung: An / Aus - <div class='tx-geshi-pi1'><style type="text/css">
- <!--/* GeSHi (c) Nigel McNie 2004 (http://qbnz.com/highlighter) */
- .php .de1, .php .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
- .php .imp {font-weight: bold; color: red;}
- .php li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;background: #EEEEEE;}
- .php .kw1 {color: #b1b100;}
- .php .kw2 {color: #000000; font-weight: bold;}
- .php .kw3 {color: #000066;}
- .php .co1 {color: #808080; font-style: italic;}
- .php .co2 {color: #808080; font-style: italic;}
- .php .coMULTI {color: #808080; font-style: italic;}
- .php .es0 {color: #000099; font-weight: bold;}
- .php .br0 {color: #66cc66;}
- .php .st0 {color: #ff0000;}
- .php .nu0 {color: #cc66cc;}
- .php .me1 {color: #006600;}
- .php .me2 {color: #006600;}
- .php .re0 {color: #0000ff;}
- -->
- </style><div class="tx-geshi-pi1">
- <table width="100%"><tr><td align="left"><strong>Php:</strong></td><td align="right">Zeilennummerierung:
- <strong>An</strong> /
- <a href="index.php?id=34&action=list_post&code_numbering=0&tid=&page=">Aus</a></td></tr></table></div><div class="php"><ol><li> </li></ol></div></div>
/TYPOSCRIPT]
Ich habe für einen Kunden diese Vorgehensweise umgesetzt und hatte die Schwierigkeit, davon abweichende Contentelemente ohne diesen Rahmen umzusetzen. Folgendes ist dafür die Lösung:
tt_content.stdWrap.outerWrap = <div class="xyz">|</div>
tt_content.stdWrap.outerWrap.if{
value = 0
equals.field = section_frame
}
Funktioniert bei mir nicht mit dem normalen wrap aber outerWrap tuts umso besser.
Nun kann man im jeweiligen Contentelement über die Auswahl "Rahmen" -> "Unsichtbar" den Rahmen abschalten.
Have Fun!
Tim






