eZ Community » Forums » Setup & design » Print a table...
expandshrink

Print a table...

Print a table...

Monday 05 May 2003 11:12:56 pm - 2 replies

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...)

Monday 05 May 2003 11: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 2:00:24 pm

Thanks this prints out the data happy.gif Emoticon
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...

Modified on Tuesday 06 May 2003 3:20:21 pm by

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from