悟途网移动版

DEDECMS

悟途网 > CMS > DEDECMS > 正文

dedecms织梦系统全站图片调用教程

2016-02-25 21:15 悟途网 T

dedecms织梦系统如何调用全站图片,先看下某某在线的全站图片代码:

<DIV class=main_c>

<DIV class=title3>

<H3>推荐新闻</H3></DIV>

<DIV class=recommend>

<DIV class=rec_img><A href="http://www.aaa.com/news/1/6041.html" target=_blank><IMG alt=小克里琴科VS海耶称重仪式 src="{dede:global.cfg_templets_skin/}/images/smallfa5ad63b4574550fac1912986e09b8e51309541311.jpg"></A></DIV>

<DIV class=rec_word>

<UL>

<LI>

<H4><A title=小克里琴科VS海耶称重仪式 href="http://www.aaa.cn/news/1/6041.html" target=_blank>小克里琴科VS海耶称重仪式</A></H4></LI>

<LI class=word>北京时间2011年7月1日,2011年WBA世界拳王争霸赛进行赛前称重,多位拳坛顶尖级人物现身仪式现场。图为小克里琴科VS大卫.海... </LI>

</UL>

</DIV>

</DIV>

<DIV class=recommend>

<DIV class=rec_img><A href="http://www.aaa.cn/news/1/6038.html" target=_blank><IMG alt=梅威瑟VS奥提兹洛杉矶之唇舌战 src="{dede:global.cfg_templets_skin/}/images/smallfef0b5dcd16ced8f235ba5b7ac2bf0dd.jpg"></A></DIV>

<DIV class=rec_word>

<UL>

<LI>

<H4><A title=梅威瑟VS奥提兹洛杉矶之唇舌战 href="http://www.aaa.cn/news/1/6038.html" target=_blank>梅威瑟VS奥提兹洛杉矶之唇舌战</A></H4></LI>

<LI class=word>在今天的早些时候,P4P冠军弗罗伊德.梅威瑟与WBC次中量级冠军维克多.奥提兹在洛杉矶召开了一次新闻发布会,正式宣布他们将在9月17日的米... </LI>

</UL>

</DIV>

</DIV>

<DIV class=recommend>

<DIV class=rec_img><A href="http://www.aaa.com/news/1/6004.html" target=_blank><IMG alt=梅威瑟VS奥提兹纽约召开新闻发布会 src="{dede:global.cfg_templets_skin/}/images/small0a72185ad918b79b8177baff67a7d8f51309318211.jpg"></A></DIV>

<DIV class=rec_word>

<UL>

<LI>

<H4><A title=梅威瑟VS奥提兹纽约召开新闻发布会 href="http://www.aaa.com/news/1/6004.html" target=_blank>梅威瑟VS奥提兹纽约召开新闻发布会</A></H4></LI>

<LI class=word>28号早些时候,保持不败的P4P冠军弗罗伊德.梅威瑟与WBC次中量级冠军维克多.奥提兹在纽约城的胡德逊剧场召开了一场新闻发布会,正式宣布... </LI>

</UL>

</DIV>

</DIV>

</DIV>

为了方便写教程,我删除了几行代码,默认上调用出11个图片,我删除了8个。以便于代码显示。

将上面的代码修改为织梦的调用代码:

<DIV class=main_c>

<DIV class=title3>

<H3>推荐新闻</H3></DIV>

{dede:arclist row='11' titlelen='30' type='image.' infolen='100'} 

<DIV class=recommend>

<DIV class=rec_img><A href="[field:arcurl/]" target=_blank><IMG alt=[field:title/] src="[field:litpic/]"></A></DIV>

<DIV class=rec_word>

<UL>

<LI>

<H4><A title=[field:title/] href="[field:arcurl/]" target=_blank>[field:title/]</A></H4></LI>

<LI class=word>[field:infos/]...</LI>

</UL>

</DIV>

</DIV>

{/dede:arclist} 

</DIV>

代码解释:

row='11' 调用11个图片文章 

titlelen='30' 标题长度30字节

type='image.' 有缩略图的内容 

infolen='100' 简介的长度

我们查看下前台演示:

dedecms织梦系统全站图片调用教程