第一種 普通靈動(dòng)標(biāo)簽調(diào)用
1、 用名稱的調(diào)用 tagname==$bqr['tagname']?>
[e:loop={"select * from [!db.pre!]enewstags order by tagid",0,24,0}]
e/tags/?tagname==$bqr['tagname']?>' class='tag-link-=$bqr['tagid']?>' title='=$bqr[num]?>個(gè)話題' style='font-size: 9pt;' target="_blank">=$bqr['tagname']?>(=$bqr[num]?>)[/e:loop]
或
[e:loop={"select * from [!db.pre!]enewstags order by num DESC limit 20",0,24,0}]
echo '
'.$bqr['tagname'].'('.$bqr['num'].')';
?>
[/e:loop]
注釋:[e:loop={"select * from [!db.pre!]enewstags order by tagid",0,24,0}] sal查詢tag
=$public_r[newsurl]?>e/tags/?tagname==$bqr['tagname']?> 即 http://127.0.0.1/e/tag/?tagname=tag名稱
=$bqr['tagid']?> tag的id
=$bqr[num]?> 如:關(guān)于"美女"的tag詞有多少個(gè),即統(tǒng)計(jì)tag相關(guān)數(shù)
=$bqr['tagname']?> tag名稱:如"美女"
2 用id的調(diào)用 tagid==$bqr['tagid']?> 注釋:不能用--用tagid做url地址不行
[e:loop={"select * from [!db.pre!]enewstags order by tagid",0,24,0}]
=$bqr['tagname']?>[/e:loop]
第二種 靈動(dòng)標(biāo)簽+php輸出式
[e:loop={"select * from [!db.pre!]enewstags order by num DESC limit 20",0,24,0}]
echo '
'.$bqr['tagname'].'('.$bqr['num'].')';
?>
[/e:loop]
------------------------------------------------------------------------------------------
注意:如果想調(diào)用幾條 添加limit 20 調(diào)用20條
如:
1、按ID調(diào)用(新的靠前)
[e:loop={"select * from [!db.pre!]enewstags order by tagid limit 20",45,24,0}] tagid后加limit 20
2、按數(shù)量調(diào)用(信息數(shù)多的靠前)
[e:loop={"select * from [!db.pre!]enewstags order by num DESC limit 20",0,24,0}] num DESC后加limit 20