织梦列表页判断有无图片调用文章的标签
2017-04-13 14:26:42
dedecms
【
织梦
列表页判断有无图片调用文章的标签】 {dede:list pagesize='9' titlelen=44} <li> <!-- @me = (empty(@me['litpic']) ? "" : "<a href='{@me['arcurl']}' class='preview'><img src='{@me['litpic']}'/></a>"); --> [field:array runphp='yes'] @me = (strpos(@me['litpic'],'defaultpic') ? "" : "<a href='{@me['arcurl']}' class='preview'><img src='{@me['litpic']}'/></a>"); [/field:array] <h3><a href="[field:arcurl/]">[field:title/]</a></h3> <p>[[field:typelink/]] [field:pubdate function='strftime("%Y-%m-%d %H:%M:%S","@me")'/] [field:click/]人阅读</p> <p>[field:description function="cn_substr(@me,200)"/]...<a href="[field:arcurl/]" class="u-4">[详细]</a></p> </li> {/dede:list}