J-H
J-H

Reputation: 1869

Insert Smarty variable in a variable

i'm trying to insert a string containing various smarty variables and other text ( test {$testvar} ... ) in a smarty variable with this method

$this->tpl()->assign('sCurrentView',$test);

But smarty does not resolve the content and displays the smary variables as text.

What am i doing wrong? Isn't this working?

Upvotes: 0

Views: 116

Answers (1)

Steven Liao
Steven Liao

Reputation: 3787

Looks like a minor syntax error to me.

$smarty_object->assign('wanted_template_name', $value);

Upvotes: 1

Related Questions