|
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 |
Mohan Smarty Rookie
Joined: 08 Dec 2004 Posts: 10
|
Posted: Mon Dec 27, 2004 8:14 am Post subject: Navigation bar --> help needed |
|
|
iam using navigation menu for my site which comes dynamically
i cannot assign the values to templates in loop, for example
my coding is
function navigation($catid)
{
$navquery = "query";
$res = mysql_query($navquery);
while($rec = mysql_fetch_array($res))
{
$catid = $rec['catid'];
$childid = $rec['childid'];
$catname = $rec['catname'];
}
if ($childid != 0)
{
$this->navigation($childid);
}
$this->assign("navbar",$catname);
}
iam calling the function recursively, but the output is displaying the last category name.
i need to display in this format
cd>>dvd>>dvd v1.02>>
but when i echo the variable $catname it is printing correctly, but i could not assign the $catname variable to template
if i assign the $catname to template my result is as follows
dvd v1.02>>
please help me how could i assign the variable in loop to template
thanks regards
mohan |
|
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
|