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 !

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

eZ debug

Timing: Jan 18 2025 16:10:15
Script start
Timing: Jan 18 2025 16:10:15
Module start 'layout'
Timing: Jan 18 2025 16:10:15
Module start 'content'
Timing: Jan 18 2025 16:10:15
Module end 'content'
Timing: Jan 18 2025 16:10:15
Script end

Main resources:

Total runtime0.7910 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 587.9141152.6250
Module start 'layout' 0.00570.0040 740.539139.4453
Module start 'content' 0.00980.7796 779.9844401.0469
Module end 'content' 0.78940.0016 1,181.03138.1641
Script end 0.7910  1,189.1953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4456160.0002
Check MTime0.00150.1954160.0001
Mysql Total
Database connection0.00090.115710.0009
Mysqli_queries0.755195.4607460.0164
Looping result0.00040.0478440.0000
Template Total0.760996.220.3805
Template load0.00240.306820.0012
Template processing0.758595.881920.3792
Template load and register function0.00030.037910.0003
states
state_id_array0.00070.091710.0007
state_identifier_array0.00100.127720.0005
Override
Cache load0.00200.250680.0002
Sytem overhead
Fetch class attribute can translate value0.00050.064910.0005
Fetch class attribute name0.00210.270710.0021
XML
Image XML parsing0.00010.011010.0001
class_abstraction
Instantiating content class attribute0.00000.001110.0000
General
dbfile0.00070.0871100.0001
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 6
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs