發(fā)表日期:2017-11 文章編輯:小燈 瀏覽次數(shù):2525
dedeCMS5.6以前的版本
打開DEDECMS根目錄include/common.func.php
在最底部 ?> 前面加入以下代碼:
$tsql = new DedeSql(false);
$tags = '';
$tsql->SetQuery("Select i.tag From dede_taglist t left join dede_tagindex i on i.id=t.tid where t.aid='$aid'");
$tsql->Execute('t');
while($row = $tsql->GetArray('t',MYSQL_ASSOC)){
$tags .= "<a href='/tags.php?/".urlencode($row['tag'])."/'>".$row['tag']."</a> ";
}
return $tags;
}
2.然后在文章頁可以使用
{dede:field.id function="listtag(@me)"/}
來調(diào)用TAG標簽,
在列表頁可以使用
[field:id function="listtag(@me)"/]
來調(diào)用TAG標簽.
dedeCMS5.7
dedecms v5.7版本直接使用標簽:[field:id function=GetTags(@me)/] ,就可以調(diào)用出來了。只不過不帶連接的,如果需要連接,請注釋掉include\helpers\archive.helper.php文件的130行:
// $tags .= ($tags=='' ? $row['tag'] : ','.$row['tag']);
用下面語句替換,當然你也可以加入自己的樣式
$tags .= "<a href='/tags.php?/""</a> ";
日期:2018-06 瀏覽次數(shù):3952
日期:2019-09 瀏覽次數(shù):5219
日期:2018-06 瀏覽次數(shù):4244
日期:2018-06 瀏覽次數(shù):3973
日期:2018-05 瀏覽次數(shù):4218
日期:2018-05 瀏覽次數(shù):4435
日期:2018-05 瀏覽次數(shù):5103
日期:2018-05 瀏覽次數(shù):3926
日期:2018-05 瀏覽次數(shù):4081
日期:2018-05 瀏覽次數(shù):4440
日期:2018-05 瀏覽次數(shù):3407
日期:2018-03 瀏覽次數(shù):3338
日期:2018-03 瀏覽次數(shù):3451
日期:2018-01 瀏覽次數(shù):3301
日期:2018-01 瀏覽次數(shù):4012
日期:2018-01 瀏覽次數(shù):3342
日期:2018-01 瀏覽次數(shù):3141
日期:2017-12 瀏覽次數(shù):3233
日期:2017-12 瀏覽次數(shù):3475
日期:2017-12 瀏覽次數(shù):3509
日期:2017-12 瀏覽次數(shù):3061
日期:2017-12 瀏覽次數(shù):3420
日期:2017-12 瀏覽次數(shù):3177
日期:2017-12 瀏覽次數(shù):3216
日期:2017-12 瀏覽次數(shù):3122
日期:2017-12 瀏覽次數(shù):3222
日期:2017-12 瀏覽次數(shù):3167
日期:2017-12 瀏覽次數(shù):3144
日期:2019-09 瀏覽次數(shù):3139
日期:2017-12 瀏覽次數(shù):3198
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.