douju1280 2013-09-03 13:16
浏览 40
已采纳

在变量中插入Smarty变量

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?

  • 写回答

1条回答 默认 最新

  • dongtan7998 2013-09-05 08:33
    关注

    Looks like a minor syntax error to me.

    $smarty_object->assign('wanted_template_name', $value);
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?