本站资源均来自互联网,仅供学习与参考,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
Copyright @ 2015-2020 织梦园 版权所有
Power by DedeCms
鲁ICP备15039853号-1
鲁公网安备 37132302000249号
模板标签 TAG标签 网站地图 XML地图 今日更新 返回顶部
DedeCMS首页文章列表显示图片的代码,我们先来看一下效果图:
1、首先我们找到dedecms首页模版里面的列表代码,代码如下:
2、在代码的相应位置添加如下代码标签:
3、***终代码应该如下
保存一下,再重新生成主页就OK了
{dede:channelartlist} <dl class="tbox"> <dt><strong><a href="{dede:field name='typeurl'/}">{dede:field name='typename'/}</a></strong><span class="more"><a href="{dede:field name='typeurl'/}">更多...</a></span></dt> <dd> <ul class="d1 ico3"> {dede:arclist titlelen='60' row='8'} <li><span class="date">[field:pubdate function="MyDate('m-d',@me)"/]</span><a href="[field:arcurl /]">[field:title /]</a></li> {/dede:arclist} </ul> </dd> </dl> {/dede:channelartlist} |
2、在代码的相应位置添加如下代码标签:
<ul class="e5"> {dede:arclist row='2' type='image.commend.' } <li><a href="[field:arcurl /]"><img src="[field:litpic /]" /></a></li> {/dede:arclist} </ul> |
3、***终代码应该如下
{dede:channelartlist} <dl class="tbox"> <dt><strong><a href="{dede:field name='typeurl'/}">{dede:field name='typename'/}</a></strong><span class="more"><a href="{dede:field name='typeurl'/}">更多...</a></span></dt> <dd> <ul class="e5"> {dede:arclist row='2' type='image.commend.' } <li><a href="[field:arcurl /]"><img src="[field:litpic /]" /></a></li> {/dede:arclist} </ul> <ul class="d1 ico3"> {dede:arclist titlelen='60' row='8'} <li><span class="date">[field:pubdate function="MyDate('m-d',@me)"/]</span><a href="[field:arcurl /]">[field:title /]</a></li> {/dede:arclist} </ul> </dd> </dl> {/dede:channelartlist} |
保存一下,再重新生成主页就OK了