dedecms标签调用大全
2012-09-24 00:01:14 来源:WEB开发网控制字数描述标记: [field:description function="cn_substr(@me,100)"/]...
--------------------------------------------------------------------------------
调用文章tags标记: {dede:tag type='current'/}
--------------------------------------------------------------------------------
文章关键字与描述: {dede:field name='keywords'/}
{dede:field name='description' function='html2text(@me)'/}
--------------------------------------------------------------------------------
栏目介绍:{dede:field name='description' function='html2text(@me)'/}
--------------------------------------------------------------------------------
调用外部htm文件:{dede:include file='head.htm' ismake='yes'/}
--------------------------------------------------------------------------------
搜索文章调用标签:{dede:global name='keyword'/}"的搜索结果 - {dede:global name='cfg_webname'/} 搜索" {dede:global name='keyword'/}</span>" 的结果
--------------------------------------------------------------------------------
递增序列号: [field:global name=autoindex/]
--------------------------------------------------------------------------------
列表隔5行加一行线:
{dede:list pagesize='50'}
<LI><a href="[field:arcurl /]" title="[field:title function='htmlspecialchars(@me)'/]"
target=_blank>[field:title function="cn_substr(@me,48)"/]</a>[field:pubdate runphp='yes']
$a="<font color=red>".strftime('%m-%d',@me)."</font>";
$b=strftime('%m-%d',@me);
$ntime = time();
$day3 = 3600 * 24;
if(($ntime - @me) < $day3) @me = $a;
else @me =$b;
[/field:pubdate]<br>
[field:global name=autoindex runphp="yes"]
if(@me%5==0)@me="<hr />";
else @me="";
[/field:global]
{/dede:list}
<DIV class="line2 m1 m3"></DIV></LI>
--------------------------------------------------------------------------------
最新 文章列表 “隔行换色” 的方法
{dede:arclist orderby=pubdate titlelen='26' row='10'}
[field:global runphp='yes' name=autoindex]
$a="<div id='a'>";
$b="<div id='b'>";
if ((@me%2)==0) @me=$a;
else @me=$b;
[/field:global]
<ul>
<li>[field:title/]</li>
</ul>
</div>
{/dede:arclist}
--------------------------------------------------------------------------------
24小时内更新的文章时间显示为红色:
[field:pubdate runphp='yes']
$a="<font color=red>".strftime('%m-%d',@me)."</font>";
$b=strftime('%m-%d',@me);
$ntime = time();
$day3 = 3600 * 24;
if(($ntime - @me) < $day3) @me = $a;
else @me =$b;
[/field:pubdate]
--------------------------------------------------------------------------------
更多精彩
赞助商链接