Wednesday 10 August 2005 5:42:54 am
Here is the solution.... Your create a section for each top folder then you use this code replacing part of the old one:
{section var=menu loop=$:docs last-value}
{let monnoeud=fetch( 'content', 'node', hash( 'node_id', $menu.id ) )}
{if eq($monnoeud.object.section_id,$module_result.section_id)}
{set last_level=$menu.last|is_array|choose( $menu.level, $menu.last.level )}
{section show=and( $last_level|eq( $menu.level ), $menu.number|gt( 1 ) )}
</li>
{section-else}
{section show=and( $last_level|gt( $menu.level ), $menu.number|gt( 1 ) )}
</li>
{"</ul>
</li>"|repeat(sub( $last_level, $menu.level ))}
{/section}
{/section}
{section show=and( $last_level|lt( $menu.level ), $menu.number|gt( 1 ) )}
<ul>
<li class="menu-level-{$menu.level}">
{section-else}
<li class="menu-level-{$menu.level}">
{/section}
<a {$menu.is_selected|choose( '', 'class="selected"' )} href={$menu.url_alias|ezurl}>{$menu.text|shorten( 25 )}</a>
{set depth=$menu.level}
{/if}
{/let}
{/section}
What is important is this {let monnoeud=fetch( 'content', 'node', hash( 'node_id', $menu.id ) )}
to get the full information of the node and then
{if eq($monnoeud.object.section_id,$module_result.section_id)}
to exclude the object that doesn't belong to the same section as the module_result
|