1、 用名称的调用 tagname=<?=$bqr['tagname']?>
[e:loop={"select * from [!db.pre!]enewstags order by tagid",0,24,0}] <a href='<?=$public_r[newsurl]?>e/tags/?tagname=<?=$bqr['tagname']?>' class='tag-link-<?=$bqr['tagid']?>' title='<?=$bqr[num]?>个话题' style='font-size: 9pt;' target="_blank"><?=$bqr['tagname']?>(<?=$bqr[num]?>)</a>[/e:loop]
或[e:loop={"select * from [!db.pre!]enewstags order by num DESC limit 20",0,24,0}] <?echo '<a href="/e/tags/?tagname='.urlencode($bqr['tagname']).'" target="_blank" title="'.$bqr['num'].'个话题" >'.$bqr['tagname'].'('.$bqr['num'].')</a>';?>[/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]?> 如:关于“美女”的tag词有多少个,即统计tag相关数<?=$bqr['tagname']?> tag名称:如“美女”
2 用id的调用 tagid=<?=$bqr['tagid']?> 注释:不能用--用tagid做url地址不行[e:loop={"select * from [!db.pre!]enewstags order by tagid",0,24,0}]<li><a href="/e/tags/?tagid=<?=$bqr['tagid']?>" target="_blank"><?=$bqr['tagname']?></a></li>[/e:loop]
第二种 灵动标签+php输出式[e:loop={"select * from [!db.pre!]enewstags order by num DESC limit 20",0,24,0}]<?echo '<a href="<?=$public_r[newsurl]?>e/tags/?tagname='.urlencode($bqr['tagname']).'" target="_blank" title="'.$bqr['num'].'个话题" >'.$bqr['tagname'].'('.$bqr['num'].')</a>';?>[/e:loop]
注意:如果想调用几条 添加limit 20 调用20条如:
1、按ID调用(新的靠前)
[e:loop={"select * from [!db.pre!]enewstags order by tagid limit 20",45,24,0}] tagid后加limit 20
2、按数量调用(信息数多的靠前)[e:loop={"select * from [!db.pre!]enewstags order by num DESC limit 20",0,24,0}] num DESC后加limit 20
希望以上内容对你有所帮助!如果还有其他问题,请随时提问。 各类知识收集 拥有多年CMS企业建站经验,对 iCMS, Fastadmin, ClassCMS, LeCMS, PbootCMS, PHPCMS, 易优CMS, YzmCMS, 讯睿CMS, 极致CMS, Wordpress, HkCMS, YznCMS, WellCMS, ThinkCMF, 等各类cms的相互转化,程序开发,网站制作,bug修复,程序杀毒,插件定制都可以提供最佳解决方案。