#1 gnuser
我在自定义函数里定义了(简化了):function pagelist($thepage,$allpages){
echo $thepage."
";
echo $allpages;
}
function tpl_pagelist($p1,$p2){
return pagelist($p1['thepage'],$p2['allpages']);
}
spAddViewFunction('page','tpl_pagelist');
然后在模板page.html中用如下输出:
<{page thepage=$pager.current_page allpages=$pager.total_page}>
如果提示错误Smarty Error: Syntax Error in template "E:\APMServ5.2.6\APMServ5.2.6\www\htdocs\sp/tpl\default/bbs/page.html" on line 1 "<{page thepage=$pager.current_page allpages=$pager.total_page)}>" - Unexpected ")", expected one of: "}>" , " "
请问有什么办法可以使用两个变量呢?谢谢
2011-06-14 13:43:06