Forums / Setup & design / Display childs as column

Display childs as column

Author Message

S Delrieux

Wednesday 27 May 2009 7:11:39 am

Hello,

I'm trying to display childs of a node using 3 columns.

{let name=Child
     children=fetch('content','list',hash(parent_node_id,$node.node_id,sort_by,$node.sort_array,limit,$page_limit,offset,$view_parameters.offset,depth_operator,eq))
     can_remove=false() can_edit=false() can_create=false() can_copy=false()}

{section show=$:children}

{def $compteur=1}
<table class="list" width="100%" cellspacing="0" cellpadding="0" border="0">
{section loop=$:children}
    {if eq( $compteur, 1 )}
   		<tr>
    {/if}
	 <td>
    {$compteur}aaaaaaaaaaaaaaaaaa
    <a href={$:item.url_alias|ezurl}>{node_view_gui view=line content_node=$:item}</a>
    
     </td>
    {if eq( $compteur, 3 )}
    	{set $compteur=0}
   		</tr>
    {/if}
    
    {set $compteur=$compteur|inc}
{/section}
</table>
{if eq( $compteur, 1 )}
   		</td><td></td><td></td></tr>
{elseif eq( $compteur, 2 )}
   		</td><td></td></tr>
{/if}



{/section}
{/let}

but I'm all wrong.

Can anyone help ? thanks !