0

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?

J-H
  • 1,795
  • 6
  • 22
  • 41
  • Have a look at http://stackoverflow.com/questions/4315046/smarty-evaluate-a-template-stored-in-a-php-variable – periklis Sep 04 '13 at 06:27

1 Answers1

1

Looks like a minor syntax error to me.

$smarty_object->assign('wanted_template_name', $value);
Steven Liao
  • 3,577
  • 3
  • 19
  • 25