网站标题名称{dede:global.cfg_webname/}
网站域名链接{dede:global.cfg_basehost/}
站点安装目录{dede:global.cfg_cmspath/}
首页高亮判断<a href="/" class="current">首页</a>
channelartlist多个栏目调用dede:channelartlist
channelartlist栏目高亮样式dede:field.currentstyle
自增+判断{大括号}dede:global.itemindex +
判断是否有下级栏目dede:field.typeid runphp=yes
channel调用顶级栏目+高亮dede:channel type='top'
channel调用子级栏目dede:channel type='son'
自增[中括号][field:global name=autoindex/]
[field:array runphp=yes]
global $cfg_templets_skin;
@me = (@me['litpic'] == '/images/defaultpic.gif' ? "" : "<div class='image_frame'><a href='{@me['arcurl']}'><img src='{@me['litpic']}'></a></div>");
[/field:array]
[field:array runphp=yes]if(@me == '/images/defaultpic.gif')@me = "";else @me = "<div class='news-pic'><img src='@me'></div>";[/field:array]
[field:array runphp=yes]
if($GLOBALS[autoindex]%4==0)@me="{@me['litpic']}";else @me="{@me['title']}";
[/field:array]
{dede:field name=array runphp=yes}
global $cfg_templets_skin;
@me = (@me['litpic'] == '/images/defaultpic.gif' ? "" : "<div class='image_frame'><a href='{@me['arcurl']}'><img src='{@me['litpic']}'></a></div>");
{/dede:field}
{dede:field.litpic runphp=yes}if(@me == '/images/defaultpic.gif')@me = "";else @me = "<div class='news-pic'><img src='@me'></div>";{/dede:field.litpic}
{dede:field name=array runphp=yes}
if($GLOBALS[autoindex]%4==0)@me="{@me['litpic']}";else @me="{@me['title']}";
{/dede:field}
{dede:sql sql="SELECT * FROM #@__archives WHERE arcrank>-1 AND id in(~myid~) ORDER BY FIELD(id,~myid~)"}
<a href="[field:id runphp=yes]$id=@me;$url=GetOneArchive($id);@me=$url['arcurl'];[/field:id]"><img src="[field:litpic/]">[field:title/]</a>
<p>[field:description/]</p>
{/dede:sql}
{dede:sql sql="SELECT * FROM #@__arctype WHERE reid=1 AND typename=~title~"}
<a href="[field:array runphp=yes]@me = GetOneTypeUrlA(@me);[/field:array]">[field:typename/]</a>
{/dede:sql}
<!-- 一级栏目 -->
{dede:channelartlist row=7 typeid=top currentstyle=current}
<li>
<a href="{dede:field.typeurl/}">{dede:field.typename/}</a>
<ul class="class2">
<!-- 二级栏目 -->
{dede:channel type=son noself=yes}
<li>
<a href="[field:typelink/]">[field:typename/]</a>
<ul class="class3">
<!-- 三级栏目 -->
[field:id runphp=yes]
global $dsql;
$sql = "Select id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath FROM `#@__arctype` WHERE reid=@me And ishidden<>1 order by sortrank asc limit 0,10";
$dsql->SetQuery($sql);
$dsql->Execute('t');
$result = '';
while($row = $dsql->GetArray('t'))
{
$typename = $row['typename'];
$typeurl = GetOneTypeUrlA($row);
$result .= "<li><a href='{$typeurl}'>{$typename}</a></li>";
}
@me = $result;
[/field:id]
</ul>
</li>
{/dede:channel}
</ul>
</li>
{/dede:channelartlist}
<!-- 一级栏目 -->
{dede:channelartlist row=7 typeid=top currentstyle=current}
<li>
<a href="{dede:field.typeurl/}">{dede:field.typename/}</a>
<ul class="class2">
<!-- 二级栏目 -->
{dede:channel type=son noself=yes}
<li>
<a href="[field:typelink/]">[field:typename/]</a>
<ul class="class3">
<!-- 二级栏目下的文章+自定义字段 -->
[field:id runphp=yes]
global $dsql;
$sql = "Select arc.*,addf.* FROM `#@__archives` arc LEFT JOIN `#@__addonshop` addf ON arc.id=addf.aid WHERE arc.arcrank>-1 AND arc.typeid=@me ORDER BY arc.id desc limit 0,10";
$dsql->SetQuery($sql);
$dsql->Execute('t');
$result = '';
while($row = $dsql->GetArray('t'))
{
$row['arcurl'] = GetOneArchive($row['id']);
$row['pubdate'] = MyDate('Y-m-d',$row['pubdate']);
$result .= "<li><span>时间:{$row['pubdate']}</span><a href='{$row['arcurl']}'>{$row['title']}</a><span>价格:{$row['price']}</span></li>";
}
@me = $result;
[/field:id]
</ul>
</li>
{/dede:channel}
</ul>
</li>
{/dede:channelartlist}
引入头部模板{dede:include filename="head_m.htm"/}
引入底部模板{dede:include filename="foot_m.htm"/}
手机站路径{dede:global.cfg_mobileurl/}
网站域名[中括号][field:global.cfg_basehost/]
模板路径[中括号][field:global.cfg_templets_skin/]
channelartlist多个栏目调用dede:channelartlist
channel顶级栏目调用dede:channel type='top'
channel子级栏目调用dede:channel type='son'
获取一个栏目链接{dede:type}{/dede:type}