-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