Zum Inhalt springen

HTML säubern und verschiedene Content Elemente

Erstellt am 16. Dezember 2010 · Noch keine Antworten

Tags: Frage

leibnitz ·

Hallo,

steh mal wieder vor einer Aufgabe bzgl. Typo3.

1. HTML Code säubern und formatieren

Ich möchte gerne die HTML ausgabe anders formatieren, weiß allerdings nicht wie genau.

Ziel soll folgender Code werden:

<div class="intro">
<h2>Überschrift</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus id dui mauris. Nulla ipsum augue.</p>
</div>

der aktuelle Code der derzeit rauskommt ist folgender:

<div class="csc-default" id="c1">
<div class="csc-header csc-header-n1">
<h3 class="csc-firstHeader">Überschrift</h3>
</div><p class="bodytext">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus id dui mauris. Nulla ipsum augue.</p>
</div>

mit folgendem TypoScript hab ich schon mal das hier erreicht:

<div class="csc-default" id="c1">
<h3>Überschrift</h3>
<p class="bodytext">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus id dui mauris. Nulla ipsum augue.</p>
</div>
plugin.tx_cssstyledcontent._CSS_DEFAULT_STYLE >

# // Prefix-Kommentare ausschalten
config.disablePrefixComment = 1
lib.stdheader.5.prefixComment >
lib.stdheader.stdWrap.prefixComment >
tt_content.stdWrap.prefixComment >
tt_content.header.20.prefixComment >
tt_content.text.20.prefixComment >
tt_content.image.20.stdWrap.prefixComment >
tt_content.bullets.20.stdWrap.prefixComment >
tt_content.table.20.stdWrap.prefixComment >
tt_content.uploads.20.stdWrap.prefixComment >
tt_content.multimedia.20.stdWrap.prefixComment >
tt_content.mailform.20.stdWrap.prefixComment >
tt_content.search.20.stdWrap.prefixComment >
tt_content.search.30.stdWrap.prefixComment >
tt_content.login.20.stdWrap.prefixComment >
tt_content.splash.20.stdWrap.prefixComment >
tt_content.menu.20.stdWrap.prefixComment >
tt_content.shortcut.20.stdWrap.prefixComment >
tt_content.list.20.stdWrap.prefixComment > 
tt_content.script.prefixComment >
tt_content.div.prefixComment >
tt_content.html.prefixComment >
tt_content.default.prefixComment >

# // Vorangestellten Anker bei Inhaltselementen entfernen
# tt_content.stdWrap.dataWrap >
# tt_content.header.20.dataWrap >

# // Zusätzliche CSS-Klassen bei Standardüberschriften entfernen
lib.stdheader.3 = LOAD_REGISTER
lib.stdheader.3.headerClass =
lib.stdheader.3.headerClass.noTrimWrap = |
lib.stdheader.stdWrap.dataWrap >

# // Einfache <hx>-Tags ohne Style-Deklarationen verwenden
lib.stdheader.10.1.fontTag = <h1>|</h1>
lib.stdheader.10.2.fontTag = <h2>|</h2>
lib.stdheader.10.3.fontTag = <h3>|</h3>
lib.stdheader.10.4.fontTag = <h4>|</h4>
lib.stdheader.10.5.fontTag = <h5>|</h5>

wie schaff ich es das der HTML Code so generiert wird, wie in meinem Beispiel?

2. verschiedene Elemente unterschiedlich formatieren

Ich habe mehrere class´s festgelegt, eine class heißt z.b. intro, die andere outro

Wie kann ich es machen, dass ich wenn ich ein Contentelement z.B. Text anlege, dann die jeweile Class verwendet wird?

2. hängt ja auch zusätzlich mit 1. zusammen.

Kann mir jemand helfen?

Mfg Leibnitz