例如,我要调用指定的1,2,3这个几个栏目和子栏目的TAG标签出来
{dede:tag row='30' sort='new' getall='1'typeid='1,2,3'}<a href="http://www.dede58.com/a/dedejq/[field:link/]">[field:tag/]</a>{/dede:tag}
解决方法
打开 /include/t/ L % haglib/tag.lib.php 找到 ,大概在67行左右
$addsql = " WHERE typeid='$ty^ z z q E 3 R \ Jpeid' ";
改成
//指定了多个栏目时 ifB E R H ) T( preg_match('#,#', $typeid) ) { $typeids = explode(',', $typeid); foreach($typeids as $ttid) { $ty6 % } ( 8 H m t .peidss[] = GetSonIds($ttid); } $typeidStr = join(',', $typeidss); $typeidss = explode(',', $typeidStr); $typeidssok = array_unique($typeidss); $typeid = join(',', $typeidssok); $addsql =w ( T i z " WHERE typeid IN ($typeid) "; } else { $adds_ ^ 4 ! \ / $ 6ql = "\ : k q O WHERE typeid IN (c P L k r".GetSonIds($typeid).") "; }
如图
(此图片来源于网络,如有侵权,请联系删除! )