Thursday 05 January 2006 8:38:13 am
Hi. I'm pretty new to php and Exponential system, so bare with me with my very rookie questions here :) This is what i've done:
Made a class that allows the user to input user data, to be stored in a folder
Made a section connected to that folder that contains the items that the users post,
so that I can easily create override templates with code that changes how the data is outputted on a browser.
I've succesfully made items after creating the class, and successfully listed the items with this code:
<div class="pagetitle">
Member information
</div>
<div class="imageleft">
{* Display a picture of the member. *}
{attribute_view_gui attribute=$node.object.data_map.picture}
</div>
{* Display the attribute names and their values. *}
<table class="member_info" cellspacing="4" cellpadding="3">
<tr>
<td><b>{$node.object.data_map.realname.contentclass_attribute.name}:</b></td>
<td>{attribute_view_gui attribute=$node.object.data_map.realname}</td>
</tr>
<tr>
<td><b>{$node.object.data_map.nickname.contentclass_attribute.name}:</b></td>
<td>{attribute_view_gui attribute=$node.object.data_map.nickname}</td>
</tr>
<tr>
<td><b>{$node.object.data_map.birthdate.contentclass_attribute.name}:</b></td>
<td>{attribute_view_gui attribute=$node.object.data_map.birthdate}</td>
</tr>
<tr>
<td><b>{$node.object.data_map.gender.contentclass_attribute.name}:</b></td>
<td>{attribute_view_gui attribute=$node.object.data_map.gender}</td>
</tr>
<tr>
<td><b>{$node.object.data_map.phone.contentclass_attribute.name}:</b></td>
<td>{attribute_view_gui attribute=$node.object.data_map.phone}</td>
</tr>
<tr>
<td><b>{$node.object.data_map.email.contentclass_attribute.name}:</b></td>
<td>{attribute_view_gui attribute=$node.object.data_map.email}</td>
</tr>
</table>
Which is pretty simple. But before that code is initiated, a list of each item in that folder is presented to me on the screen. It is very similar to making a folder on admin screen, then adding an article. You can see an example here: http://www.trav24.no/index.php/portal/travtrenere/soerlandets_travpark
At that example, it lists the items in that folder. Instead I want it to list the content of each item, inside that very folder. So instead of clicking on i.e. 'Arild Berås', it will just list the
preformatted item on the first page there, including all the other ones that might lay in the folder.
Could anyone help me make a code that loops through the items in each folder, uses the code above to fetch the data and to format it as I want it to be? Thanks in advance.
|