Wednesday 15 October 2003 8:41:17 am
First of all, this "Creating a table with the loop method inside a line.tpl. " I do not understand? line.tpl is typically used within an loop, for example: an news folder which contains several articles renders by displaying the "line.tpl" for all articles within the news folder. Organize how?? Do you mean to sort and have all 1 star hotels togther, then 2 star hotels again? If yes, then a simple solution could be.
1: Name all 1 star hotels "1 star: hotelname1","1 star:hotelname2" etc. Then do the same with 2,3.. i.e. "2 star: hotelname" .. 2: Edit the folder that contains the hoteldata, and select "sort by" "name". Then in your fetch use "sort_by,$node.sort_array". See short example below: {let children=fetch('content',list,hash(parent_node_id,$node.node_id,sort_by,$node.sort_array))}
{section name=Child loop=$children}
<p>{attribute_view_gui attribute=$Child:item.data_map.uneetoile.data_int}</p>
{/section} {/let} This is a quick and dirty solutions and there are more solutions. Another one might be to put the number of stars variable in the "name" attribute of the hotel content classes, then you do not need to cluster the hotel names with the number of stars. Cheers
|