How do I make tree listing?

Author Message

Mike Borozdin

Monday 22 December 2003 6:57:35 am

Hi!

How can I make tree listing?

I have the following code:

<table class="menu" width="100%" cellspacing="0" cellpadding="0" border="0">
{let page_list=fetch( content, list, hash(
parent_node_id, array( 2, $module_result.path[1].node_id ),
sort_by,array( array( published, false() ) ),
class_filter_type, exclude,
class_filter_array, array( 'article' ),
limit, 10 ) )}

{section name=Page loop=$page_list}
<tr>
<td>
<a class="menuitem" href={concat("/content/view/full/",$Page:item.node_id,"/")|ezurl}>{$Page:item.name|wash}</a>
{let sub_list=fetch( content, list, hash(
parent_node_id, array( $Page:item.node_id ),
sort_by,array( array( published, false() ) ),
class_filter_type, exclude,
class_filter_array, array( 'article' ),
limit, 10 ) )}

{section name=sub loop=$sub_list}
  <a class="menuitem" href={concat("/content/view/full/",$sub:item.node_id,"/")|ezurl}>{$sub:item.name|wash}</a><br />
{/section}

{/let}
</td>
</tr>
{/section}

{/let}
</table>

But I get this error:

Fatal error: Call to a member function on a non-object in /users/b/o/borozda.com/html/mike/kernel/classes/ezcontentobjecttreenode.php on line 858
Fatal error: eZ publish did not finish it's request

The execution of eZ publish was abruptly ended, the debug output is present below.

Dominik Pich

Tuesday 23 December 2003 5:46:31 am

Which one is the line it complains about?

Mike Borozdin

Wednesday 24 December 2003 9:25:35 am

Dominik,

never mind, I've just come across the answer to my question, here it is - http://www.ez.no/developer/ez_publish_3/documentation/customization/tips_tricks/creating_tree_menus. I haven't tried it yet though....but I will indeed!

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 19 2025 01:12:54
Script start
Timing: Jan 19 2025 01:12:54
Module start 'layout'
Timing: Jan 19 2025 01:12:54
Module start 'content'
Timing: Jan 19 2025 01:12:54
Module end 'content'
Timing: Jan 19 2025 01:12:54
Script end

Main resources:

Total runtime0.6452 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 590.2891152.6250
Module start 'layout' 0.00620.0032 742.914139.4453
Module start 'content' 0.00940.6335 782.3594479.9375
Module end 'content' 0.64290.0023 1,262.296912.1641
Script end 0.6452  1,274.4609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4863160.0002
Check MTime0.00120.1886160.0001
Mysql Total
Database connection0.00180.278210.0018
Mysqli_queries0.596492.4305570.0105
Looping result0.00070.1010550.0000
Template Total0.617495.720.3087
Template load0.00230.352620.0011
Template processing0.615295.338620.3076
Template load and register function0.00050.070110.0005
states
state_id_array0.00080.130710.0008
state_identifier_array0.00070.116120.0004
Override
Cache load0.00170.2631410.0000
Sytem overhead
Fetch class attribute can translate value0.00070.109420.0004
Fetch class attribute name0.00120.180730.0004
XML
Image XML parsing0.00030.043320.0001
class_abstraction
Instantiating content class attribute0.00000.000930.0000
General
dbfile0.00070.1079100.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs