include/taglib/目录下的 tag.lib.php 文件
if($getall==0 && isset($refObj->Fields['tags']) && !empty($refObj->Fields['aid'])) { $dsql->SetQuery("Select tid From `ddmx_taglist` where aid = '{$refObj->Fields['aid']}' "); $dsql->Execute(); $ids = ''; while($row = $dsql->GetArray()) { $ids .= ( $ids=='' ? $row['tid'] : ','.$row['tid'] ); } if($ids != '') { $addsql = " where id in($ids) "; } if($addsql=='') return ''; } else if($getall==2) { $addsql = " where typeid='{$refObj->Fields['typeid']}' "; } else { if(!empty($typeid)) { $addsql = " where typeid='$typeid' "; }
模板调用:
{dede:tag sort='hot' getall='2'} <a href='[field:link/]'>[field:tag /]</a> {/dede:tag}
关键字词: