[Typo3] TemplaVoila: Creating a template for tables
David Rosenkranz
david.rosenkranz at detewe.ch
Wed Nov 2 08:56:59 CET 2005
Hi,
In "FTB" I read about how to deal with repeatable data objects. I thought
that this aproach would be good to create a table template thinking of the
rows as repeatable data objects. So I created this simple HTML:
...
<div id="root">
<table id="containertable">
<tr id="headline">
<td id="headcell1">Col1</td>
<td id="headcell2">Col2</td>
</tr>
<tr id="dataline">
<td id="datacell1">Col1</td>
<td id="datacell2">Col2</td>
</tr>
</table>
</div>
...
Then I created the following DS/TO:
Root Element (Container, mapped to div#root, inner)
Table (Section, mapped to table#containertable, inner)
Headline (Container, mapped to tr#headline, inner)
Headline cell 1 (Element, mapped to td#headcell1, inner)
Headline cell 2 (Element, mapped to td#headcell2, inner)
Dataline (Container, mapped to tr#dataine, inner)
Dataline cell 1 (Element, mapped to td#datacell1, inner)
Dataline cell 2 (Element, mapped to td#datacell2, inner)
Creating a content element for a page works fine with this new template.
BUT: rendering produces the following HTML:
<div id="root">
<table id="containertable">
<td id="headcell1">COLUMN1</td>
<td id="headcell2">COLUMN2</td>
<td id="datacell1">DATA2</td>
<td id="datacell2">DATA1</td>
<td id="datacell1">DATA4</td>
<td id="datacell2">DATA3</td>
</table>
</div>
As you can see, the <tr> tags are missing. How do I have to change my ds/to
to get this right? Thanks a lot for your support.
Best regards,
David
Bern, Switzerland
More information about the TYPO3-english
mailing list