• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: foreach in a foreach
PostPosted: Thu Jun 28, 2012 8:33 pm 
Offline
Forum Members
Forum Members

Joined: Sat Mar 03, 2012 9:45 pm
Posts: 13
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


Top
 Profile  
 
 Post subject: Re: foreach in a foreach
PostPosted: Thu Jun 28, 2012 8:36 pm 
Offline
Forum Members
Forum Members

Joined: Sat Mar 03, 2012 9:45 pm
Posts: 13
This is the code that I have turned ...

Code:
{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}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner