Zum Inhalt springen

Inhalte und Überschriften trennen -> Elemente trenne

Erstellt am 26. September 2006 · Noch keine Antworten

Tags: Inhaltselemente, Frage

McGregor ·

Hi Forum!

Ich muss Inhalt und Überschrift voneinander trennen. Dazu habe ich folgende Posts gelesen und bin auch ganz weit gekommen, da der Inhalt wirklich von der Überschrift getrennt wird. Doch leider gibt es da ein paar Probleme.

#493031
#491341
#232681

Wenn ich mehrere Inhaltselemente auf eine Seite setze, dann wird nur die erste Überschrift angezeigt und dann alle Inhalte hintereinander. Gewünscht ist sowas:

Überschrift 1
Inhalt 1.1
Inhalt 1.2

Überschrift 2
Inhalt 2.1
Inhalt 2.2

Ich bekomme aber folgendes

Überschrift 1
Inhalt 1.1
Inhalt 1.2
Inhalt 2.1
Inhalt 2.2

Das liegt am TS (ich weiß auch wo)

lib.stdheader >

# Eigenen Header bauen
temp.my_header = CONTENT
temp.my_header {
    # Artikel-Ueberschrift ermitteln
  table = tt_content
  select {
    pidInList = this
    orderBy = sorting
    where = colPos=0
    begin = 0
    max = 1
  }
  renderObj = TEXT
  renderObj.field = header
    # HTML-Code vor/nach dem dynamischen Eintrage (Wrap)
  stdWrap.required = 1
  stdWrap.wrap = <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td width="1" bgcolor="#F00019"><img src="clear.gif" width="20" height="20" alt="" /></td><td class="cscheader">|</td></tr></table>
}

temp.my_content = CONTENT
temp.my_content {
  table = tt_content
  select {
    pidInList = this
    orderBy = sorting
    where = colPos=0
  }
}

temp.meinContent = COA
temp.meinContent {
  5 <  temp.my_header
  10 < temp.my_content
  10.wrap = <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td class="grau" width="1"><img src="clear.gif" width="20" alt="" /></td><td class="inhalt"><!--TYPO3SEARCH_begin-->|<!--TYPO3SEARCH_end--></td></tr></table>
}

temp.meinContent2 < temp.meinContent
temp.meinContent2.5.select.where = colPos = 2
temp.meinContent2.10.select.where = colPos = 2
temp.meinContent2.10.wrap = <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td class="grau"><img src="clear.gif" width="20" alt="" /></td><td class="inhalt"><!--TYPO3SEARCH_begin-->|<!--TYPO3SEARCH_end--></td></tr></table><br /><br />

[...]

page.10.marks.C1 < temp.meinContent
page.10.marks.C2 < temp.meinContent2

[...]

Und zwar am

    begin = 0
    max = 1

Doch wenn ich begin udn max entferne dann erhalte ich alle Überschriften am Anfang, also folgendes

Überschrift 1
Überschrift 2
Inhalt 1.1
Inhalt 1.2
Inhalt 2.1
Inhalt 2.2

Wie kann ich nun den "Startpunkt" dynamisch setzen, sodaß die Ausgabe korrekt wird?
Jede Hilfe ist willkommen.
Danke

McGregor