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
|