帝国CMS灵动标签输出排行榜式的带序号的排序列表
很多网站都会使用到带序号的列表样式,非常美观,制作这种带序号的效果,必须<li>列表输出不同的命名,如下例:
<li class="no1"><a href="#">标题</a><href="http://www.softhome.cc/li>
<li class="no3"><a href="#">标题</a><href="http://www.softhome.cc/li>
<li class="no4"><a href="#">标题</a><href="http://www.softhome.cc/li>
<li class="no5"><a href="#">标题</a><href="http://www.softhome.cc/li>
<li class="no6"><a href="#">标题</a><href="http://www.softhome.cc/li>
然后再针对性的写不同的CSS样式。
帝国CMS灵动标签调用列表可以输入为这样的列表,代码如下:
[e:loop={'selfinfo',10,1,0}]
<li class="<?=$bqno?>">
<a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a>
<href="http://www.softhome.cc/li>
[/e:loop]
也就是在正常的灵动标签里添加了 <?=$bqno?> ,这样生成的列表就会输出数字的列表:
<li class="softhome1"><a href="#">标题</a><href="http://www.softhome.cc/li>
<li class="softhome3"><a href="#">标题</a><href="http://www.softhome.cc/li>
<li class="softhome4"><a href="#">标题</a><href="http://www.softhome.cc/li>
<li class="softhome5"><a href="#">标题</a><href="http://www.softhome.cc/li>
<li class="softhome6"><a href="#">标题</a><href="http://www.softhome.cc/li>
要从2开始就 $bqno+1 要从3开始就 $bqno+2