返回列表
本文标签:
$v) {
if ($v != "") {
$_infolist[] = ['title'=>$v, 'num'=>1];
}
}
}else{
$_content = new app\index\model\ContentModel();
if ($_type == 1) {
//获取全站tag
$_infolist = $_content->getTaglist();
}else{
//获取后台tag
$_datalist = db('tagurl')->orderRaw("id DESC")->select();
foreach ($_datalist as $k => $v) {
$_infolist[] = [
'title'=>$v['tagname'],
'num'=>$_content->getTagnum($v['tagname'])
];
}
}
}
if ($_limit) {
$_infolist = array_slice($_infolist, 0, $_limit);
}
foreach ($_infolist as $autoindex => $val):
$tag['title'] = $val['title'];
$tag['url'] = getTagurl($val['title']);
$tag['num'] = $val['num'];
?>
sitemap
标签大全