|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
compuboy1010 Smarty Rookie
Joined: 20 Aug 2003 Posts: 10
|
Posted: Mon Feb 16, 2004 1:43 pm Post subject: Run through array |
|
|
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 |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon Feb 16, 2004 4:11 pm Post subject: |
|
|
{$menuItems->categoryHeader}
maybe. |
|
Back to top |
|
|
|
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
|