今天织梦模板给大家讲解帝国CMS调用友情链接的常见方法:
1.帝国内置标签:phomelink
[phomelink]每行显示数,显示总数,操作类型,分类id,是否显示原链接[/phomelink]
2.文字形式-灵动标签
[e:loop={'select * from [!db.pre!]enewslink where checked=1 and classid=1 order by myorder',20,24,0}]
<li><a href="<?=$bqr[lurl]?>" title="<?=$bqr[lname]?>" target="_blank"><?=$bqr[lname]?></a></li>
[/e:loop]
3.图片形式-灵动标签
[e:loop={'select * from [!db.pre!]enewslink where checked=1 and classid=1 order by lid',3,24,0}]
<li><a href="<?=$bqr[lurl]?>" title="<?=$bqr[lname]?>" target="_blank"><img src="<?=$bqr[lpic]?>"/></a></li>
[/e:loop]
4.下拉形式-灵动标签
<form id="form1" name="form1" method="post" action="">
<label for="FRIEND LINK ">友情链接:</label>
<select onchange="window.open(this.options[selectedIndex].value,'','');" name="FRIEND LINK" size="1" id="FRIEND LINK">
[e:loop={'select * from [!db.pre!]enewslink where checked=1 order by lid',20,24,0}]
<option value="<?=$bqr[lurl]?>">
<?=$bqr[lname]?>
</option>
[/e:loop]
</select>
</form>
更多经验交流欢迎留言,开拓族期待和大家的共同成长!