1.首页导航
{dede:channel type="top" row='6'} <span><a href='[field:typeurl/]'>[field:typename/]</a></span> {/dede:channel} ‘
2.首页文章列表
{dede:type typeid ='65'} <div class="title"><a href="[field:typelink/]">[field:typename/]</a></div> {/dede:type} <div class="service_a"> <ul> {dede:arclist row='5' titlelen='60' orderby ='pubdate' typeid='8' } <li><a href="[field:arcurl/]">[field:title/]</a></li> {/dede:arclist} {dede:type typeid ='8'} <li><a class="more more_gd" href="[field:typelink/]">了解更多</a></li> {/dede:type} </ul> </div>
3.二级导航
<ul class="nav-sec-menu"> {dede:channelartlist typeid='72,72'} {dede:channel type='son' row='4'} <li><a href="[field:typelink/]">[field:typename/]</a></li> {/dede:channel} {/dede:channelartlist} </ul>
4.获取当前栏目父栏目名称
{dede:field.typeid runphp='yes'}$ID = @me; $sql = "SELECT * FROM `dede_arctype` WHERE id=$ID";$query = mysql_query($sql);$row=mysql_fetch_array($query); $relID = "$row[reid]"; $topID="$row[topid]"; if($relID == 0) {@me = $row[typename];}else{$sql = "SELECT `typename` FROM `dede_arctype` WHERE id=$topID";$query = mysql_query($sql);$row=mysql_fetch_array($query); @me = $row[typename];}{/dede:field.typeid} <ul class="sidebar-nav"> {dede:channel row='7' type ='son' } <li><a href="[field:typelink/]">[field:typename/]</a></li> {/dede:channel} </ul>
5.位置
{dede:field name='position'/}
6.列表页
<div class="list"> <ul> {dede:list pagesize ='10'} <li> <h2 class="list-title"><a href="[field:arcurl/]">[field:title/]</a></h2> <p class="list-des">[field:description function="cn_substr(@me,168)"/]...</p> <div class="list-time">时间:[field:pubdate function="GetDateTimeMK(@me)" /]</div> </li> {/dede:list} </ul> </div>
7.内容页
<div class="fpage"> {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/} </div>
最新文章标签调用:
<div><!--最新文档--> {dede:arclist row=10 titlelen=42} <li><a href="[field:arcurl/]">[field:title/]</a></li> {/dede:arclist} <!--//最新文档--> </div>
推荐内容标签调用:
<div"> <h2>推荐内容</h2> <ul> {dede:arclist row=10 titlelen=42 flag=c} <li><a href="[field:arcurl/]">[field:title/]</a></li> {/dede:arclist} </ul> </div>
热门文章标签调用:
<div> <h2>热门排行</h2> <ul> {dede:arclist row=10 titlelen=42 orderby=click} <li><a href="[field:arcurl/]">[field:title/]</a></li> {/dede:arclist} </ul> </div>
所有栏目标签调用
<div> 您当前的位置:网站首页 </div> <div> {dede:channelartlist} <h2><span><a href='{dede:field name='typeurl'/}'>更多 >></a></span><a href="{dede:field name='typeurl'/}">{dede:field name='typename'/}</a></h2> <ul> {dede:arclist titlelen='50' row='10'} <li><span>[field:pubdate function="MyDate('m-d',@me)"/]</span><a href="[field:arcurl /]">[field:title /]</a></li> {/dede:arclist} </ul> <br/> {/dede:channelartlist} </div> </div>
指定栏目标签调用
{
dede:arclist titlelen='50' row='20' typeid='1,7'} <li><span class="date">[field:pubdate function="MyDate('m-d',@me)"/]</span><a href="[field:arcurl /]">[field:title /]</a></li> {/dede:arclist}
typeid='' 表示栏目ID,在列表模板和档案模板中一般不需要指定,在封面模板中允许用","分开表示多个栏目;
7.内容页
<div class="content"> <h1 class="content-title">{dede:field.title/}</h1> <p class="content-info"> <span>{dede:field.pubdate function="MyDate('Y-m-d H:i',@me)"/}</span>| <span>发布者: {dede:field.writer/}</span>| <span>查看: <script src="{dede:field name='phpurl'/}/count.php?view=yes&aid={dede:field name='id'/}&mid={dede:field name='mid'/}"type='text/javascript' language="javascript"></script></span>| <span> 评论: 0</span> </p> <div class="article-content">{dede:field.body/}</div> </div>
8.调用缩略图
{dede:arclist row="10" imgwidth="100" imgheight="100" type="image" typeid=""} <li>[field:image/]<a href="[field:typeurl/]" title="[field:fulltitle/]" >[[field:typename/]]</a><a href="[field:arcurl /]">[field:title /]</a></li> {/dede:arclist}
[field:image/] 这是缩略图
[field:typeurl/] 栏目链接
[field:arcurl /] 标题链接