织梦中limit的用法详解(调用指定id下的指定文章)

WBOY
发布: 2016-07-29 09:15:10
原创
1238 人浏览过

limit的用法大致可以理解为:调用指定id下的指定文章。

下面为代码片段,需要的朋友自行拿去:

<span>{dede:arclist typeid='6' row='1' limit='0,1'}
</span><span>  <span>li</span><span>></span><span>    <span>a </span><span>href</span><span>="[field:arcurl/]"</span><span> target</span><span>="_blank"</span><span> rel</span><span>="nofollow"</span><span>></span><span><span>img </span><span>class</span><span>="zhuanjia_img"</span><span> src</span><span>=""</span><span>/></span><span>    </span><span>a</span><span>></span><span>    <span>h3</span><span>><span>a </span><span>href</span><span>="[field:arcurl/]"</span><span> target</span><span>="_blank"</span><span>></span>[field:title/]<span></span><span>a</span><span>></span><span>h3</span><span>></span><span><span>p</span><span>><span>span</span><span>></span>简介:<span></span><span>span</span><span>></span>[field:description function="cn_substr(@me,55)"/]...<span><span>a </span><span>style</span><span>="color:#C2316C;"</span><span> href</span><span>="[field:arourl/]"</span><span>></span>【详情】<span></span><span>a</span><span>></span><span>p</span><span>></span><span>    <span>div </span><span>class</span><span>="z11"</span><span>></span><span>      <span>div </span><span>class</span><span>="gz1"</span><span>><span>a </span><span>href</span><span>="[field:arcurl/]"</span><span>  rel</span><span>="nofollow"</span><span>></span>详细介绍<span></span><span>a</span><span>></span><span>div</span><span>></span><span>      <span>div </span><span>class</span><span>="gz2"</span><span>><span>a </span><span>href</span><span>="javascript:void(0)"</span><span> onclick</span><span>="openChat()"</span><span> target</span><span>="_blank"</span><span>  rel</span><span>="nofollow"</span><span>></span>在线咨询<span></span><span>a</span><span>></span><span>div</span><span>></span><span></span><span>div</span><span>></span><span></span><span>li</span><span>></span><span>{/dede:arclist}</span></span></span></span></span></span></span></span></span></span></span></span></span></span>
登录后复制

上述代码调用了id为6下的栏目1篇(从第一篇开始数,取1篇文章)

limit是一个灵活的取数标签,作用是取出指定的文章。<br>limit='0,1',表示从第一个文章开始,取1篇文章。<br>limit='1,1',表示从第二个文章开始,取1篇文章。<br>limit='2,3',表示从第三个文章开始,取3篇文章。<br>以此类推,用法有点类似row标签,但是比row更加灵活。
登录后复制

以上就介绍了织梦中limit的用法详解(调用指定id下的指定文章),包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板