【发布时间】:2012-09-25 00:17:07
【问题描述】:
我们正在使用 smarty,
在我们的一种观点中,我们有:
{if $header.showNav}...{/if}
如果我们想设置我们使用:
$header = $smarty->getTemplateVars('header');
$header['showNav'] = true;
$smarty->assign('header', $header);
哪个有效, 不过好像有点啰嗦。
smarty 是否提供了一种更轻松的管理方式?
【问题讨论】: