比如我们想在分类页列表做个显示当前分类的名称,那么直接模板处定义为:
{$cat_name}
然后修改 category.php
在 $smarty->assign(‘page_title’, $position[‘title’]); // 页面标题
$smarty->assign(‘ur_here’, $position[‘ur_here’]); // 当前位置
后增加:
$smarty->assign(‘cat_name’, $cat[‘cat_name’]);
美国服务器选米云 – FWQ.AI
比如我们想在分类页列表做个显示当前分类的名称,那么直接模板处定义为:
{$cat_name}
然后修改 category.php
在 $smarty->assign(‘page_title’, $position[‘title’]); // 页面标题
$smarty->assign(‘ur_here’, $position[‘ur_here’]); // 当前位置
后增加:
$smarty->assign(‘cat_name’, $cat[‘cat_name’]);