2011-04-29 88 views
1

我收到以下错误,当我调用AJAX功能找不到指定的语法错误在我的Smarty模板

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 

和我CAND发现这一特定线路上

<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> 

回答

0

任何语法错误在smarty中,你用“。”,而不是“ - >”来定位对象和数组。

所以我会尝试

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