Forums / Developer / How do I make tree listing?

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!