PHP群:95885625 Hbuilder+MUI群:81989597 站长QQ:634381967
    您现在的位置: 首页 > CMS教程 > dedecms教程 > 正文

    dede内容页调用缩略图方法

    作者:admin来源:网络浏览:时间:2020-09-30 00:07:50我要评论
    导读:1,如何才可以显示缩略图答案:{dede:fieldname=&#39;image&#39;/}改为<imgsrc="{dede:fieldname=&#39;litpic&#39;/}"/>2,需求:把缩略图,...
    1,如何才可以显示缩略图

    答案:{dede:field name='image'/}改为<img src="{dede:field name='litpic'/}" />  

     

    2,需求:把缩略图,文章内容body,外链(这里我把标题简称用作外链),加到首页

    {dede:arclist row='6' titlelen='250'  imgwidth='80' imgheight='107' addfields='body' typeid='15' channelid='1'}//高亮两个参数是关键
            
            <div class="il_1">
                <div class="img"> 
                    <img src="[field:litpic]" /> 

                  <a href="[field:shorttitle/]"   class="butten" target="_blank">查看详细</a>//本来我这里有个链接,可在遍历的时候老出不了<a>标签,我就改到下面去了,到现在还不知道为佬
                </div>
                <div class="ms">
                  <h2 class="ms_h2">[field:title/]</h2>
                   [field:body function='cn_substr(html2text(@me),600)'/]...
               <a href="[field:shorttitle/]"   class="butten" target="_blank">查看详细</a> 
                </div>
            </div>
     {/dede:arclist}

    转载请注明(B5教程网)原文链接:https://b5.mxunkeji.com/content-102-1408-1.html
    相关热词搜索: