织梦channel标签判断在第四个循环后增加图标
这的意思就是在第四个栏目的时候插入一张图片,效果如图:https://www.adminbuy.cn/uploads/allimg/200218/1-20021Q112164b.png
可以参考以下判断语句进行添加
[field:id runphp='yes', if(@me=='4'){ @me="class='123'";} else {@me="";}[/field:id,
以上代码意思为判断栏目ID为4时添加class="123"样式
然后在对class="123"做对应的样式进行调用即可
注:在你给出的代码中的[*,或标签中添加,因为只给这么一段代码不能准确的给你答案,还需要针对你网站样式来定的,下边给你写出了使用方法,祝你成功
这是判断id为几的时候插入
如果想在第几个栏目的时候插入图片可以这样写
{dede:channel type='top' row='8' currentstyle="
[*,
"}
[*,
[field:global runphp='yes' name=autoindex,if(@me=='3'){@me="
/skin/images/logo.png
";} else {@me="";}[/field:global,
{/dede:channel}
[field:global runphp='yes' name=autoindex,if(@me=='3'){@me="
/skin/images/logo.png
";} else {@me="";}[/field:global,
页:
[1]