帝国CMS默认的友情链接标签内置的格式太坑爹了,无法满足个性化需求。
可使用灵动标签来调用:
调用文字链接:
1 | [e:loop={ 'select*from[!db.pre!]enewslinkwherechecked=1andclassid=1orderbylid' ,20,24,0}]<arel= "nofollow noopener noreferrer" href= "<?=$bqr[lurl]?>" target= "_blank" ><?= $bqr [lname]?></a>[/e:loop] |
调用图文链接:
1 | [e:loop={ 'select*from[!db.pre!]enewslinkwherechecked=1andclassid=1orderbylid' ,3,24,0}]<arel= "nofollow noopener noreferrer" href= "<?=$bqr[lurl]?>" title= "<?=$bqr[lname]?>" target= "_blank" ><imgsrc= "<?=$bqr[lpic]?>" /></a>[/e:loop] |
其中,classid=1 为友情链接分类ID,checkde=1 为审核过的链接。
如果希望不需要指定分类,则去掉 and classid=1 即可。
下拉列表式友情链接调用:
1 | <formid= "form1" name= "form1" method= "post" action= "" ><labelfor= "FRIENDLINK" >友情链接:</label><selectonchange= "window.open(this.options[selectedIndex].value,'','');" name= "FRIENDLINK" size= "1" id= "FRIENDLINK" >[e:loop={ 'select*from[!db.pre!]enewslinkwherechecked=1orderbylid' ,20,24,0}]<optionvalue= "<?=$bqr[lurl]?>" ><?= $bqr [lname]?></option>[/e:loop]</select></form> |
本文帝国CMS灵动标签调用友情链接到此结束。爱不能强求,但爱的关系需要努力维护。很多人都尝过爱情的滋味,它能让我们今天心花怒放,明天却垂头丧气;它能叫我们满怀希望,也能使我们信心尽失。爱掺杂着各种感觉,但这些感觉是变幻无常的,它们不是爱的本身,而是爱的温度,但只要你愿意,就能决定以什么样的态度对待对方。小编再次感谢大家对我们的支持!