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

$smarty->get_template_vars('variable') isn't working

 
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
feti
Smarty Rookie


Joined: 04 Aug 2003
Posts: 7
Location: Ohio

PostPosted: Mon Aug 04, 2003 9:16 pm    Post subject: $smarty->get_template_vars('variable') isn't working Reply with quote

I'm attempting to retrieve an assigned variable from smarty, but it's retrieving an array of all the possible variables. Here's what I'm doing.

$array = $smarty->get_template_vars('variable');

When I loop through the variables I can see my variable in there, but I just cannot request it.

-feti
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
messju
Administrator


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

PostPosted: Mon Aug 04, 2003 9:22 pm    Post subject: Reply with quote

it seems you're using an old version of smarty (2.4.0-2.4.2).
the optional $name parameter was added in Smarty-2.5.0 AFAIR.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
feti
Smarty Rookie


Joined: 04 Aug 2003
Posts: 7
Location: Ohio

PostPosted: Tue Aug 05, 2003 1:25 am    Post subject: Reply with quote

Ah, thank you. That was the problem I believe. I was using _tpl_vars after I noticed a post about it, but resolved the entire issue by not even needing to retrieve the value outside of a template.

Now to find a good block tutorial.
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
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