Good night to all ... I hope very much for your help ...
Is there a standard {foreach from = $ nodelist item = node} I need this to drive an array of foreach with classes. here's what I got. It displays all elementy as many times as there are in the array elementov. and so every element duplicates the menu. I need so that the first element of the first menu, go to the second element classes 2 and so on .... here is an example http://vartiprof.prior24.com/index.php?page=about-us
foreach in a foreach
Re: foreach in a foreach
This is the code that I have turned ...
Code: Select all
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->haschildren == 'true'}
{foreach from=$items key=myId item=i}
<a id="{$myId}" href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>
{$myId}
{$node->menutext}</a>
{/foreach}
{else}
<div class="sub">
<ul class="l1">
<li>
<a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if}>{$node->menutext}</a>
</li>
</ul>
</div>
{/if}
{/foreach}{/if}