Mittwald CM Service: TYPO3-Hosting, TYPO3-Schulungen, Agenturpakete, Managed-Server
Optimiertes TYPO3 Hosting von Mittwald CM Service

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):

  1. tt_content.stdWrap.wrap (
  2. <table border="1">
  3.   <tr>
  4.     <td>|</td>
  5.   <tr>
  6. </table>
  7. )

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:

  1. <div id="content-normal">###CONTENT_NORMAL###</div>
  2. <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)

  1. 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:

#content-normal .content-element {
   color: blue;
   border: 1px solid #666666;
}
#content-margin .content-element h1 {
   color: green;
}

Kommentare von registrierten Benutzern:

Kommentar von: Thoss

04. 01. 2008, 23:31
[TYPOSCRIPT]
Html4strict:Zeilennummerierung:  An / Aus

  1. Javascript:Zeilennummerierung:  An / Aus

    1. <div class='tx-geshi-pi1'><style type="text/css">
    2.                             <!--/* GeSHi (c) Nigel McNie 2004 (http://qbnz.com/highlighter) */
    3. .php .de1, .php .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
    4. .php .imp {font-weight: bold; color: red;}
    5. .php li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;background: #EEEEEE;}
    6. .php .kw1 {color: #b1b100;}
    7. .php .kw2 {color: #000000; font-weight: bold;}
    8. .php .kw3 {color: #000066;}
    9. .php .co1 {color: #808080; font-style: italic;}
    10. .php .co2 {color: #808080; font-style: italic;}
    11. .php .coMULTI {color: #808080; font-style: italic;}
    12. .php .es0 {color: #000099; font-weight: bold;}
    13. .php .br0 {color: #66cc66;}
    14. .php .st0 {color: #ff0000;}
    15. .php .nu0 {color: #cc66cc;}
    16. .php .me1 {color: #006600;}
    17. .php .me2 {color: #006600;}
    18. .php .re0 {color: #0000ff;}
    19. -->
    20.                             </style><div class="tx-geshi-pi1">
    21.                                     <table width="100%"><tr><td align="left"><strong>Php:</strong></td><td align="right">Zeilennummerierung: 
    22.                                         <strong>An</strong> /
    23.                                         <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]

Profil

Kommentar von: Thoss

04. 01. 2008, 23:31
[TYPOSCRIPT]
Html4strict:Zeilennummerierung:  An / Aus

  1. Javascript:Zeilennummerierung:  An / Aus

    1. <div class='tx-geshi-pi1'><style type="text/css">
    2.                             <!--/* GeSHi (c) Nigel McNie 2004 (http://qbnz.com/highlighter) */
    3. .php .de1, .php .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
    4. .php .imp {font-weight: bold; color: red;}
    5. .php li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;background: #EEEEEE;}
    6. .php .kw1 {color: #b1b100;}
    7. .php .kw2 {color: #000000; font-weight: bold;}
    8. .php .kw3 {color: #000066;}
    9. .php .co1 {color: #808080; font-style: italic;}
    10. .php .co2 {color: #808080; font-style: italic;}
    11. .php .coMULTI {color: #808080; font-style: italic;}
    12. .php .es0 {color: #000099; font-weight: bold;}
    13. .php .br0 {color: #66cc66;}
    14. .php .st0 {color: #ff0000;}
    15. .php .nu0 {color: #cc66cc;}
    16. .php .me1 {color: #006600;}
    17. .php .me2 {color: #006600;}
    18. .php .re0 {color: #0000ff;}
    19. -->
    20.                             </style><div class="tx-geshi-pi1">
    21.                                     <table width="100%"><tr><td align="left"><strong>Php:</strong></td><td align="right">Zeilennummerierung: 
    22.                                         <strong>An</strong> /
    23.                                         <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]

Profil

Kommentar von: Thoss

04. 01. 2008, 23:31
[TYPOSCRIPT]
Html4strict:Zeilennummerierung:  An / Aus

  1. Javascript:Zeilennummerierung:  An / Aus

    1. <div class='tx-geshi-pi1'><style type="text/css">
    2.                             <!--/* GeSHi (c) Nigel McNie 2004 (http://qbnz.com/highlighter) */
    3. .php .de1, .php .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
    4. .php .imp {font-weight: bold; color: red;}
    5. .php li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;background: #EEEEEE;}
    6. .php .kw1 {color: #b1b100;}
    7. .php .kw2 {color: #000000; font-weight: bold;}
    8. .php .kw3 {color: #000066;}
    9. .php .co1 {color: #808080; font-style: italic;}
    10. .php .co2 {color: #808080; font-style: italic;}
    11. .php .coMULTI {color: #808080; font-style: italic;}
    12. .php .es0 {color: #000099; font-weight: bold;}
    13. .php .br0 {color: #66cc66;}
    14. .php .st0 {color: #ff0000;}
    15. .php .nu0 {color: #cc66cc;}
    16. .php .me1 {color: #006600;}
    17. .php .me2 {color: #006600;}
    18. .php .re0 {color: #0000ff;}
    19. -->
    20.                             </style><div class="tx-geshi-pi1">
    21.                                     <table width="100%"><tr><td align="left"><strong>Php:</strong></td><td align="right">Zeilennummerierung: 
    22.                                         <strong>An</strong> /
    23.                                         <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]

Profil

Kommentar von: Tim

19. 02. 2007, 19:42
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

Profil



Seite drucken
 
TYPO3 Hosting in der Version 4.3.2 kostenlos bei Mittwald CM Service testen

TYPO3 4.3.2 jetzt testen

Testen Sie die neue TYPO3 Version 4.3.2 kostenlos für einen Monat


Entwicklerschulungen

  • Espelkamp:
    Mit., 17.03.10 - Fre., 19.03.10
  • Berlin:
    Mit., 21.04.10 - Fre., 23.04.10
  • Köln:
    Mon., 21.06.10 - Mit., 23.06.10