tree menu navigation

Author Message

Sean O'Reilly

Wednesday 10 January 2007 1:10:33 pm

Hi Guys

I am new to ezpublish and am trying to build a treemenu for my navigation but am getting nowhere fast.

I have basically created 5 folders with various content inside and am trying to create my navigation from these.

Below is the content of my navigation.tpl file.

<div id="navigation">
  {let folder_list=fetch( content, list, hash(parent_node_id, 2, sort_by, array( array ( priority ))))}

<ul>
   {section name=top_level loop=$folder_list} 
   <li>
   <a href={concat("/", $folder2:item.url_alias)|ezroot}>{$folder2:item.name|wash}</a>

   {section show=$top_level:item.node_id|eq($module_result.path[1].node_id)}

   {let sub_folder_list=fetch( content, list, hash(parent_node_id, $module_result.path[1].node_id, sort_by, array( array( priority ))))}

<ul>
   {section name=sub_level loop=$top_level:sub_folder_list}
   <li><a href={concat("/",$top_level:sub_level:item.url_alias)|ezroot}>{$top_level:sub_level:item.name|wash}</a></li>
   {/section}
</ul>
{/let}
{/section}
</li>
{/section}
</ul>
{/let}
</div>

Can anyone give me a few pointers as to where i might be going wrong, it would be much appreciated.

Thanks

Sean

Eirik Alfstad Johansen

Tuesday 16 January 2007 9:26:36 am

Hi Sean,

What, if anything, does this code output?

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

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