Print a table...

Author Message

Monday 05 May 2003 2:12:56 pm

Hi,

I've made a custom class with 3 attributes and I would like to print these attributes in one line in a table. The next line of the table will print the next instance of the class.

Can someone explain how to accomplish this task ?
I know how to make a template and all that but don't know how to fetch the 3 attributes in a template and present them in one table as described.
Example code would be great (I'm a newbie...)

Zinistry Vacana

Monday 05 May 2003 2:46:43 pm

Hi!

Create a line_class_<id of your new class>.tpl in override/templates/node/view/ and include code like this:

<table>
<tr>
<td>
Category:
</td>
<td>
{attribute_view_gui attribute=$node.object.data_map.category}
</td>
<td>
Year:
</td>
<td>
{attribute_view_gui attribute=$node.object.data_map.year}
</td>
<td>
Language:
</td>
<td>
{attribute_view_gui attribute=$node.object.data_map.language}
</td>
</tr>
</table>

If you want a full view of you class, create full_class_<id of your class>.tpl

Tuesday 06 May 2003 5:00:24 am

Thanks this prints out the data :)
The only problem now is that there will be several tables with different length depending on the content instead of one table with all the content.

Any ideas how to get all the data in one table ?
Kind of loop trough the content...

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.