Page 1 of 1

[SOLVED]Smarty function getTemplateVars() does not work

Posted: Tue Nov 30, 2010 11:23 am
by quadracer
Hi,

I'm trying to get access to a Smarty variable like documented here

http://www.smarty.net/docs/en/api.get.template.vars.tpl

with

Code: Select all

$myVar = $smarty->getTemplateVars('foo');
I'm using a fresh 1.9.1 install. But I got only an error message
Fatal error: Call to undefined method Smarty_CMS::getTemplateVars()
Any ideas?

Re: Smarty function getTemplateVars() does not work

Posted: Tue Nov 30, 2010 1:42 pm
by RonnyK
In CMSMS you could use {get_template_vars}

Ronny

Re: Smarty function getTemplateVars() does not work

Posted: Tue Nov 30, 2010 3:03 pm
by Wishbone
He means the PHP function, not the template function.

Try $smarty->get_template_vars('foo');

Re: Smarty function getTemplateVars() does not work

Posted: Tue Nov 30, 2010 7:04 pm
by quadracer
Thank you @RonnyK and @wishbone,

was my fault. Smarty docs are updated for current Smarty version ... and this is version 3.0.5  8).

The correct url for Smarty 2 is

http://www.smarty.net/docsv2/en/api.get ... e.vars.tpl