-1
我最近开始使用Smarty,并试图找到解决方法。下面是不知道在那一刻我:Smarty - 包含模板并更新现有变量
我包括一个文件:
{include file="nforum/_partials/box_forum.tpl"}
在该文件中,我有这样的:
<a href="{$t->link}">{$t->title|truncate:$link_truncate}</a>
我想通过$ link_truncate值为30,同时包含模板(不在box_forum.tpl中 - 这对我很重要!)
我试着:
{include file="nforum/_partials/box_forum.tpl" $link_truncate = 30}
没有成功。我该怎么做?
现在我们说话!日Thnx! – oneday 2014-11-05 09:40:20