Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Run through array

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
compuboy1010
Smarty Rookie


Joined: 20 Aug 2003
Posts: 10

PostPosted: Mon Feb 16, 2004 1:43 pm    Post subject: Run through array Reply with quote

Hi,

there is the following array of arrays menu:

array_push($menu, $this->Menu1->menuItems,
$this->Menu2->menuItems,
$this->Menu3->menuItems,
$this->Menu4->menuItems);

$this->assignVars("menu", $menu);
$this->assignVars("categoryHeader", $categoryHeader);

menuItems is an array with the menu items.

There are 4 different menus.
Now there should be a header above each menu.
In the classes Menu1,Menu2, Menu3 and Menu4 there is an attribute $categoryHeader. I just can not print that out above the menus. Why doesn't it work?

The template looks like this:

<div style="clear:left;" id="col1">
{foreach from=$menu item=menuItems}
{$categoryHeader}
{include file="menu.tpl" menuItems=$menuItems} <br />
{/foreach}
</div>


Thank you.
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Mon Feb 16, 2004 4:11 pm    Post subject: Reply with quote

{$menuItems->categoryHeader}
maybe.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP