dedecms_标签调取大全

{dede:field.typename/}

内容截取

[field:description function='cn_substr(@me,80)'/]

 

[field:description/]

 

图片调取

<a href='[field:arcurl/]'> <img src='[field:litpic/]' width="218" height="149" /></a>

 

导航调取:

<li><a href='{dede:global.cfg_cmsurl/}/'>主页</a></li>

          {dede:channel type='top' row='10' currentstyle="<li class='hover'><a href='~typelink~' ~rel~>~typename~</a></li>"}

          <li><a href='[field:typeurl/]' [field:rel/]>[field:typename/]</a></li>

          {/dede:channel}

 

产品掉子分类

dede:channelartlist typeid='2,3,4'}

             <div class="productlist">

                <div class="ss">{dede:type}<a href="[field:typeurl/]">[field:typename/]</a>{/dede:type}</div>

                <ul>{dede:channel type='son'}

                    <li><a href="[field:typeurl/]">[field:typename/]</a></li>

                    {/dede:channel}

                </ul>

          </div>

             {/dede:channelartlist}

 

产品分类调取

{dede:channel  typeid=3  row='10' currentstyle="<li class='hover'><a href='~typelink~' ~rel~>~typename~</a></li>"}

          <li><a href='[field:typeurl/]' [field:rel/]>[field:typename/]</a></li>

          {/dede:channel}

 

新闻列表调取:

{dede:arclist typeid=1 row=9 titlelen=24 orderby='pubdate' }

<li><a href='[field:arcurl/]'  title="[field:fulltitle/]">[field:title/]</a> ([field:pubdate function=MyDate('y-m-d',@me)/]) </li>

{/dede:arclist}

 

 

网站的标题

{dede:global.cfg_webname/}

 

 

产品调取:     

{dede:arclist typeid=2 row=8 col=4 titlelen=20 orderby='pubdate' imgwidth=90 imgheight=90}

<table cellspacing=2 cellpadding=0 width="98%" border=0>

<tbody>

<tr>

<td align=middle>[field:imglink/]</td></tr>

<tr>

<td align=middle>[field:textlink/]</td></tr></tbody></table>

{/dede:arclist}

版权信息调用

{dede:global.cfg_powerby/}

 

 

备案号调用

{dede:global.cfg_beian/}

 

 

上一篇:{dede:prenext get='pre'/}

下一篇:{dede:prenext get='next'/}

文章标题:{dede:field.title/}

发布时间:{dede:field.pubdate function="MyDate('Y-m-d H:i',@me)"/}

文章来源:{dede:field.source/}

文章作者:{dede:field.writer/}

文章正文:{dede:field.body/}

 

相关内容

<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr class="p5" align="center" bgcolor="#dde8ee"><td><strong>标题</strong></td><td width="150" ><strong>日期</strong></td></tr>

                      {dede:likearticle row='10' titlelen='100'}<tr  class="p6" onMouseOver="this.style.backgroundColor='#F3F3F3'" onMouseOut="this.style.backgroundColor='#FFFFFF'"><td align="left" height=28><a href='[field:arcurl/]' target="_blank">[field:title/]</a> </td><td align='center'>[field:pubdate function="MyDate('y-m-d',@me)"/]</td></tr>

                      {/dede:likearticle}

                    </table>

 

友情链接

 

文字连接

{dede:flink row='24' type='text' titlelen="24"  typeid="0"}

 [field:link /]

 {/dede:flink}

图片

{dede:flink row='24' type='image' titlelen="24" typeid="0"}

[field:link /]

{/dede:flink}

 

增加字段调用

{dede:arclist titlelen='8' row='9' flag='p' typeid='137' channelid='6' addfields='brand,units' orderby='pubdate'}

                <li>

                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tb">

                      <tr>

                        <td width="110" valign="top" class="tu"><img src="[field:litpic/]" alt="[field:title/]" width="100" height="116" /></td>

                        <td valign="top">

                            <p><strong><a href="[field:arcurl/]">[field:title/]</a></strong></p>

                            <p><strong>商标:</strong>[field:brand/]</p>

                            <p><strong>产地:</strong>[field:units/]</p>

                            <p>&nbsp;</p>

                            <p><a href="[field:arcurl/]"><img src="images/xiangxi.jpg" width="98" height="28" /></a></p>

                        </td>

                      </tr>

                    </table>

                </li>

                {/dede:arclist}

 

列表页调取tag标签

打开DEDECMS根目录include/common.func.php

在最底部 ?> 前面加入以下代码:

function listtag($aid)

{  $tsql = new DedeSql(false); 

$tags = ''; 

$tsql->SetQuery("Select i.tag From dede_taglist t left join dede_tagindex i on i.id=t.tid where t.aid='$aid'"); 

$tsql->Execute('t'); 

while($row = $tsql->GetArray('t',MYSQL_ASSOC)){ 

$tags .= "<a href='/tags.php?/".urlencode($row['tag'])."/'>".$row['tag']."</a> "; 

return $tags; 

 

2.然后在文章页可以使用

 {dede:field.id function="listtag(@me)"/}

来调用TAG标签,

在列表页可以使用

 [field:id function="listtag(@me)"/]

 

后台的置顶功能只能实现列表置顶 不能实现首页置顶

加入如下代码就可以了(orderby='sortrank' ) 完整代码如下
{dede:arclist typeid='1'   row='10' titlelen='20' orderby='sortrank' }

产品首页调取价格

{dede:arclist titlelen='8' row='9' flag='p' typeid='137' channelid='6' addfields='brand,units,price' orderby='pubdate'}

<p><strong>商标:</strong>[field:brand/]</p>

<p><strong>产地:</strong>[field:units/]</p>

<p><strong>价格:</strong>[field:price/]</p>

{/dede:arclist}

 

分类信息

功能:调用地区与类型

代码:
{dede:infolink}
<b>地区:</b>[field:nativeplace /]<br />                                                                                               
<b>类型:</b>[field:infotype /]                                     
{/dede:infolink}

功能:调用最新信息

代码:{dede:arclistsg row='10' titlelen='32' orderby='pubdate' channelid='-8' idlist=''}
   [[field:typelink/]] [field:textlink/][field:pubdate function="MyDate('m-d',@me)"/]                 
{/dede:arclistsg}

功能:分类信息图片调用
代码:
{dede:arclistsg   row='1' titlelen='30' flag='c,a' infolen='80' orderby='pubdate'

posted @ 2014-10-21 01:12  江哥哥  阅读(229)  评论(0编辑  收藏  举报