Tuesday 20 September 2005 1:35:09 am
Hello,
I've a problem with the treemenu operator from ez Publish.
I'd like to have a Treemenu on the left side of the page. So I tried all the examples from the book and this site. But any of these examples worked. This is the last code I tried to get work:
{let menu = treemenu ($module_result.path,$module_result.node_id,false(),1,5)}
<table width="290" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src={"1x1.gif"|ezimage} width="11" height="1" alt="" border="0" /></td>
<td><img src={"1x1.gif"|ezimage} width="11" height="1" alt="" border="0" /></td>
<td><img src={"1x1.gif"|ezimage} width="11" height="1" alt="" border="0" /></td>
<td><img src={"1x1.gif"|ezimage} width="11" height="1" alt="" border="0" /></td>
<td><img src={"1x1.gif"|ezimage} width="11" height="1" alt="" border="0" /></td>
<td><img src={"1x1.gif"|ezimage} width="11" height="1" alt="" border="0" /></td>
<td><img src={"1x1.gif"|ezimage} width="11" height="1" alt="" border="0" /></td>
<td><img src={"1x1.gif"|ezimage} width="11" height="1" alt="" border="0" /></td>
<td><img src={"1x1.gif"|ezimage} width="11" height="1" alt="" border="0" /></td>
<td width=""><img src={"1x1.gif"|ezimage} width="11" height="1" alt="" border="0" /></td>
</tr>
{section loop=$menu}
<tr>
{switch match=$:item.level}
{case match=0} {* Top level menu item *}
<td colspan="1" valign="top" align="right" class="pfeil">
{section show=$:item.is_selected}
<img src={"menu_1pfeil.gif"|ezimage} width="5" height="8" alt="" border="0" />
{/section}
</td>
<td colspan="9" class="menuitem">
<a href={$:item.url_alias}>{$:item.name}</a>
</td>
{/case}
{case match=1}
<td colspan="2" valign="top" align="right" class="pfeil">
{section show=$:item.is_selected}
<img src={"menu_2pfeile.gif"|ezimage} width="10" height="8" alt="" border="0" />
{/section}
</td>
<td colspan="8" class="menuitem">
<a href={$:item.url_alias}>{$:item.name}</a>
</td>
{/case}
{case match=2}
<td colspan="3" valign="top" align="right" class="pfeil">
{section show=$:item.is_selected}
<img src={"menu_2pfeile.gif"|ezimage} width="10" height="8" alt="" border="0" />
{/section}
</td>
<td colspan="7" class="menuitem">
<a href={$:item.url_alias}>{$:item.name}</a>
</td>
{/case}
{case match=3}
<td colspan="4" valign="top" align="right" class="pfeil">
{section show=$:item.is_selected}
<img src={"menu_2pfeile.gif"|ezimage} width="10" height="8" alt="" border="0" />
{/section}
</td>
<td colspan="6" class="menuitem">
<a href={$:item.url_alias}>{$:item.name}</a>
</td>
{/case}
{case match=4}
<td colspan="5" valign="top" align="right" class="pfeil">
{section show=$:item.is_selected}
<img src={"menu_2pfeile.gif"|ezimage} width="10" height="8" alt="" border="0" />
{/section}
</td>
<td colspan="5" class="menuitem">
<a href={$:item.url_alias}>{$:item.name}</a>
</td>
{/case}
{case match=5}
<td colspan="6" valign="top" align="right" class="pfeil">
{section show=$:item.is_selected}
<img src={"menu_2pfeile.gif"|ezimage} width="10" height="8" alt="" border="0" />
{/section}
</td>
<td colspan="4" class="menuitem">
<a href={$:item.url_alias}>{$:item.name}</a>
</td>
{/case}
{case match=6}
<td colspan="7" valign="top" align="right" class="pfeil">
{section show=$:item.is_selected}
<img src={"menu_2pfeile.gif"|ezimage} width="10" height="8" alt="" border="0" />
{/section}
</td>
<td colspan="3" class="menuitem">
<a href={$:item.url_alias}>{$:item.name}</a>
</td>
{/case}
{case} {* default menu case *}
<td colspan="8"></td>
<td colspan="2" class="submenuitem">
<a href={$:item.url_alias}>{$:item.name}</a>
</td>
{/case}
{/switch}
</tr>
{/section}
</table>
{/let}
Thanks for help
|