我是 smarty 的初学者 我的 php 函数是:
public function list_special() {
Session::set('was_in_special', 'true');
if (isset($_GET['showall']) && $_GET['showall'] == 'yes') {
TPL::$s->assign('products', $this->proc->getSpecialProducts('true'));
} else {
TPL::$s->assign('products', $this->proc->getSpecialProducts());
}
TPL::$s->assign('title', 'Specialus katalogas - norėdami papildyti specialiųjų kainų sąraša, susisiekite su savo vadybininku.');
//TPL::$s->assign('products', $this->proc->getSpecialProducts());
TPL::$s->assign("pages_num", $this->proc->get_special_products_pages());
TPL::$s->assign("parameters", Request::$params[1] . "/" . Request::$params[2] . "/");
echo TPL::$s->fetch('catalog.products.html');
}
我想在一页中调用这个函数,我尝试使用{products}
,但这没有显示给我