在我的Smarty模板中找不到指示的语法错误

时间:2011-04-29 11:25:25

标签: smarty

当我调用ajax函数时,我收到以下错误

SmartyCompilerException: Syntax Error in template "themes/themename/ajax-product-sort.tpl" on line 16 "<option value="{$link->addSortDetails($request, 'price', 'asc')|escape:'htmlall':'UTF-8'}" {if $orderby eq 'price' AND $orderway eq 'ASC' }selected="selected"{/if>l} {s='price: lowest first'}</option>" - Unexpected " }" in D:\wamp\www\sitename\tools\smarty\sysplugins\smarty_internal_templatecompilerbase.php on line 431 

我可以在该特定行找到任何语法错误

<option value="{$link->addSortDetails($request, 'price', 'asc')|escape:'htmlall':'UTF-8'}" {if $orderby eq 'price'    AND $orderway eq 'ASC' }selected="selected"{/if}>{l s='price: lowest first'}</option>

1 个答案:

答案 0 :(得分:0)

在smarty中,你用“。”来对象和数组,而不是“ - &gt;”。

所以我会尝试

{$link.addSortDetails($request, 'price', 'asc')|escape:'htmlall':'UTF-8'}