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

Navigation bar --> help needed

 
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 -> Smarty Development
View previous topic :: View next topic  
Author Message
Mohan
Smarty Rookie


Joined: 08 Dec 2004
Posts: 10

PostPosted: Mon Dec 27, 2004 8:14 am    Post subject: Navigation bar --> help needed Reply with quote

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
View user's profile Send private message
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 -> Smarty Development 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