Zum Inhalt springen

Spalten ausrichten

Erstellt am 6. April 2005 · 6 Antworten · letzte Antwort am 10. April 2005

Tags: Inhaltselemente, Frage

dete ·

Hallo,

ich habe folgendes, scheinbar einfaches Problem, aber selbst noch keine einfache Idee:

Ein zweispaltiges Layout. Zur Eingabe des Inhalts soll der Redakteur im BE die Inhalltsbereiche Normal und Rechts nutzen. Ein "Inhaltsblock" besteht immer aus NORMAL + RECHTS und soll daher im FE auch entsprechend ausgerichtet sein, d.h. wenn In der Mittleren Spalte ein neuer Artikel beginnt, soll die Spalte Rechts auf gleicher Höhe beginnen --- also im Grunde eine zweispaltige Tabelle
- in der ein neuer Inhaltsblock eine neue Zeile generiert:

Artikel 1                   Rechts 1
text text text             text text
text text text
text text text

Artikel 2                   Rechts 2
text text text             text text
text text text
text text text

Ist dies ohne TemplaVoila und Flex Content zu realisieren? Würde mich über Anregungen freuen!!

maxhb ·
dete schrieb

scheint ja leider doch nicht so einfach zu sein ... 😢

Das ist auch nicht so einfach - leider.

Bisher besteht der einzige Weg, den ich mir vorstellen kann darin, ein neues Content-Element zu entwickeln, das die Eingabe für beide(!) Spalten erlaubt. Dann könnte man die Inhalte, für beide Spalten synchronisieren.

Bei der Eingabe über 2 Spalten hat man vermutlich keine Chance.

CU
maxhb

dete ·

Danke für die -wenn auch nicht erbauliche- Antwort. Zumindest beruhigt es mich etwas, dass ich mir nicht umsonst den Kopf zerbrochen habe, ...

Muss ich wohl doch ggf. auf TV zurückgreifen, obgleich dann die Content-Eingabe für einen Redakteur nicht soo erfreulich ist.

nevyn ·

Ok ich glaub die Lösung gefunden haben. Und zwar in der Typo3 Dokumentation, in der TSRef im Abschnitt CONTENT
Dort unten das Letzte beispiel.

Code Listing:

LISTING #1

# Defining a temporary object with the content:
temp.contentInTableAlignedCells = COA
temp.contentInTableAlignedCells.wrap = <table border=1> | </table>
temp.contentInTableAlignedCells {
    # Setting up a COA content object at position 10 which shows 
    # a table with two columns and a single content element in each
  10 = COA
  10.5 = TEXT
  10.5.value = <tr><td>
  10.10 < styles.content.get
  10.10.select.begin =1
  10.10.select.max =1
  10.15 = TEXT
  10.15.value = </td><td>
  10.20 < styles.content.get
  10.20.select.begin =0
  10.20.select.max =1
  10.25 = TEXT
  10.25.value = </td></tr>

    # Now, copy that content object from position 10 as many times as needed
    # and adjust parameters
  20 < .10
  20.10.select.begin = 3
  20.20.select.begin = 4

  30 < .10
  30.10.select.begin = 5
  30.20.select.begin = 6
}

# Now, copy this object into a position in the page rendering object tree.
page.10 < temp.contentInTableAlignedCells


---------------
LISTING #2:


# Defining a temporary object with the content:
temp.contentInTableAlignedCells = COA
temp.contentInTableAlignedCells.wrap = <table border=1> | </table>
temp.contentInTableAlignedCells {
    # Setting up a COA content object at position 10 which shows 
    # a table with two columns and a single content element in each
  10 = COA
  10.5 = TEXT
  10.5.value = <tr><td>
  10.10 < styles.content.get
  10.10.select.begin =0
  10.10.select.max =1
  10.15 = TEXT
  10.15.value = </td><td>
  10.20 < styles.content.getRight
  10.20.select.begin =0
  10.20.select.max =1
  10.25 = TEXT
  10.25.value = </td></tr>

    # Now, copy that content object from position 10 as many times as needed
    # and adjust parameters
  20 < .10
  20.10.select.begin = 1
  20.20.select.begin = 1

  30 < .10
  30.10.select.begin = 2
  30.20.select.begin = 2

  40 < .10
  40.10.select.begin = 3
  40.20.select.begin = 3

  # ... and then you go on for as many maximum elements you will accept.
}

# Now, copy this object into a position in the page rendering object tree.
page.10 < temp.contentInTableAlignedCells

Grüsse Helmuth

dete ·

Das sieht gut aus - die Idee kann ich erst mal nachvollziehen.
Ich werds ausprobieren.
Danke!!

dete ·

Fuktioniert wie gewünscht.
Hier für die Allgemeinheit noch eine Variante ohne Tabelle, sondern mit DIVs, die dann per CSS entsprechend formatiert werden können.

Die Formatierung erscheint auch nur dann, wenn Inhalt vorhanden ist

# Defining a temporary object with the content:
temp.contentInTableAlignedCells = COA
temp.contentInTableAlignedCells.wrap = <div class="spalten"> | </div>
temp.contentInTableAlignedCells {
    # Setting up a COA content object at position 10 which shows
    # a table with two columns and a single content element in each

  10 = COA
  10.10 < styles.content.get
  10.10.select.begin =0
  10.10.select.max =1
  10.10.stdWrap.required=1
  10.10.stdWrap.wrap = <div><div class="middleRand"> | </div>


  10.20 < styles.content.getRight
  10.20.select.begin =0
  10.20.select.max =1
  10.20.stdWrap.required=1
  10.20.stdWrap.wrap = <div class="rightRand"> | </div></div>



    # Now, copy that content object from position 10 as many times as needed
    # and adjust parameters
  20 < .10
  20.10.select.begin = 1
  20.20.selct.begin = 1

 
  30 < .10
  30.10.select.begin = 2
  30.20.select.begin = 2

  40 < .10
  40.10.select.begin = 3
  40.20.select.begin = 3

  # ... and then you go on for as many maximum elements you will accept.
}

dete