网站标题名称{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_basehost,$cfg_templets_skin;
@me = (stristr(@me['litpic'],'defaultpic') ? "" : "<div class='image_frame'><a href='{$cfg_basehost}{@me['arcurl']}'><img src='{$cfg_basehost}{$cfg_templets_skin}{@me['litpic']}'></a>时间:".MyDate('Y-m-d',@me['pubdate'])."</div>");
[/field:array]
[field:litpic runphp=yes]if(stristr(@me,'defaultpic'))@me = "";else @me = "<div class='news-pic'><img src='@me'></div>";[/field:litpic]
[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_basehost,$cfg_templets_skin;
@me = (stristr(@me['litpic'],'defaultpic') ? "" : "<div class='image_frame'><a href='{$cfg_basehost}{@me['arcurl']}'><img src='{@me['litpic']}'></a></div>");
{/dede:field}
{dede:field.litpic runphp=yes}if(stristr(@me,'defaultpic'))@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:sql sql="SELECT content FROM #@__arctype WHERE id=43"}
[field:content function=cn_substr(html2text(@me),380)/]...
{/dede:sql}
{dede:sql sql="SELECT arc.*,addf.* FROM `#@__archives` arc LEFT JOIN `#@__addon19` addf ON arc.id=addf.aid WHERE arc.arcrank>-1 AND CONCAT(arc.title,arc.keywords) REGEXP ~keywords~ LIMIT 9"}
<a href="[field:id runphp=yes]$id=@me;$url=GetOneArchive($id);@me=$url['arcurl'];[/field:id]">[field:title/]</a><p>价格:[field:jiage/]</p>
{/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">
<!-- 二级栏目下的文章+普通文章自定义字段body -->
[field:id runphp=yes]
global $dsql;
$sql = "SELECT arc.*,addf.* FROM `#@__archives` arc LEFT JOIN `#@__addonarticle` 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'))
{
$arcrow = GetOneArchive($row['id']);
$row['arcurl'] = $arcrow['arcurl'];
$row['pubdate'] = MyDate('Y-m-d',$row['pubdate']);
$result .= "<li><span class=\"time\">时间:{$row['pubdate']}</span><a href=\"{$row['arcurl']}\">{$row['title']}<img src=\"{$row['litpic']}\"></a><span>文章内容:{$row['body']}</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_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}
文章内容(去除图片宽高+绝对路径){dede:field.body/}