Dede commonly used calls to regular calls:
Site name Call :<title>{dede:global.cfg_webname/}</title>
website keyword call : <meta name= "keywords" content= "{dede:global.cfg_keywords/}"/>
Site Description Call : <meta name= "description" content= "{dede:global.cfg_description/}"/>
Reference Page Header file : {dede:include filename= "head.htm"/}
reference Footer File : {dede:include filename= "foot.htm"/}
style sheet Path : {dede:global.cfg_templeturl/}
Friendship link : {dede:flink row= '/}
Prevent collection : {Dede:field name= ' body ' function= ' rndstring (@me) '/}
Top-level column invocation:
{dede:channel type= ' top ' row= ' currentstyle= ' <li class= ' hover ' ><a href= ' ~typelink~ ' ~rel~><span >~typename~</span></a></li> "}
<li><a href= ' [field:typeurl/] ' [field:rel/]><span>[field:typename/]</span></a>< /li>
{/dede:channel}
Call the sub-section of the current column:
{dede:channel type= ' son ' typeid= ' 6 ' noself= ' yes '}
<a href= ' [field:typeurl/] ' >[field:typename/]</a>
{/dede:channel}
Change style by Five elements:
{dede:arclist typeid= ' 1 ' titlelen= ' + ' row= ' typeid= ' "}
<li [Field:global name=autoindex runphp= "yes"] (@me% = = 0) [email protected]= "class=\" bline\ "": @me = ""; [/field:global]><a href= "[field:arcurl/]" >[field:title/]</a></li>
{/dede:arclist}
the updated article time in 24 hours is shown in red :
[Field:pubdate runphp= ' yes ']
$a = "<font color=red>". Strftime ('%m-%d ', @me). " </font> ";
$b =strftime ('%m-%d ', @me);
$ntime = time ();
$day 3 = 3600 * 24;
if ($ntime-@me) < $day 3) @me = $a;
else @me = $b;
[/field:pubdate]
Call to SQL:
{dede:sql sql= "select * from Dede_archives where Typeid2 in (13,14,15,16,17,18) and typeid=6 order by pubdate DESC Limit 5 "}
<li><a href= ' [field:id runphp= ' yes '] [email protected]; @me = '; $url =getonearchive ($id); @me = $url [' Arcurl ']; [/field:id] ' title= "[field:title/]" target= "_blank" ><b>[field:title function=cn_substr (@me,)/]</b ></a></li>
{/dede:sql}
List page Common label calls:
column title : {dede:field.seotitle/}
column keywords : {dede:field name= ' keywords '/}
Column Description : {dede:field name= ' description ' function= ' Html2text (@me) '/}
column content : {dede:field.content/}
Current Column location : {dede:field name= ' position '/}
List of articles in the current section :
{dede:list pagesize= ' 10 '}
<a href= ' [field:arcurl/] ' >[field:title/]</a>
[Field:description/<a href= ' [field:arcurl/] ' >[details]</a>
{/dede:list}
The current column of the article List page :
{dede:pagelist listitem= "info,index,end,pre,next,pageno,option" listsize= "5"/}
Article List page : {dede:pagebreak/}
Article page Common label calls:
article title : {dede:field.title/}_{dede:global.cfg_webname/}
Article Keywords : {dede:field.keywords/}
Article Description : {dede:field.description function= ' html2text (@me) '/}
Current article location : {dede:field name= ' position '/}
current article title name : {dede:field.title/}
Current article author : {dede:field.writer/}
Current Article source : {dede:field.source/}
Current article update date : {dede:field.pubdate function= "mydate (' y-m-d h:i ', @me)"/}
Current article content : {dede:field.body/}
Previous post : {dede:prenext get= ' pre '/}
Next : {dede:prenext get= ' next '/}
To invoke related articles :
{dede:arclist row= ' titlelen= ' orderby= ' hot '}
<li>
<a href= "[field:arcurl/]" >[field:title/]</a>
</li>
{/dede:arclis}
Call related columns :
{dede:channel type= ' self '}
<a href= ' [field:typelink/] ' title= ' [field:typename/] ' >[field:typename/]</a>
{/dede:channel}
Search page Common label calls:
Search page title : {dede:global name= ' keyword ' function= ' removexss (@me) '/}_{dede:global.cfg_webname/}
Search Page Keywords : {dede:global name= ' keyword ' function= ' removexss (@me) '/}
Search Page description : {dede:global name= ' keyword ' function= ' removexss (@me) '/}
Search Page Related article : {dede:likewords num= ' 8 '/}
Search Results List page :
{dede:list pagesize= ' titlelen= ' 10000 '}
<a href= ' [field:arcurl/] ' >[field:title/]</a>
[Field:pubdate function= "Getdatemk (@me)"/]
[Field:description/]...<a href= ' [field:arcurl/] ' >[details]</a>
{/dede:list}
{dede:pagelist listitem= "info,index,end,pre,next,pageno,option" listsize= "5"/}
Underlying template:
|
[Field:id/] |
The ID of the article, corresponding to the ID field of the dede_archives |
|
[Field:typeid/] |
ID of the column where the article is located |
* |
[field:title/] |
Article title (Control conditions include titlelen= ' bytes, the title color selected when the document is published in the background, bold) |
* |
[field:fulltitle/] |
Article title (title complete, no style) |
* |
[Field:click/] |
Number of clicks |
|
[Field:shorttitle/] |
Short title |
* |
[Field:writer/] |
Author |
* |
[Field:source/] |
Source |
* |
[Field:litpic/] |
The thumbnail address is the same as [Field:picname/] |
|
[Field:picname/] |
The thumbnail address is the same as [field:litpic/] |
* |
[field:pubdate/] |
Release date 08 [field:pubdate function=strftime ('% ', @me)/] 08th [field:pubdate function=strftime ('%d day ', @me)/] 06-08 [field:pubdate function=strftime ('%m-%d ', @me)/] June 08 [field:pubdate function=strftime ('%m month%d day ', @me)/] 09-06-08 [field: pubdate function=strftime ('%y-%m-%d ', @me)/] 2009-06-08 [field:pubdate function= Strftime ('%y-%m-%d ', @me)/] June 08, 09 [field:pubdate function=strftime ('%Y year%m month%d day ', @me)/] June 08, 2009 [field:pubdate function=strftime ('%y%m month%d day ', @me)/] 2009-06-08 13:28[field :p ubdate function=strftime ('%y-%m-%d%h:%m ', @me)/] |
|
[Field:lastpost/] |
Last review time usage same as [field:pubdate/] |
|
[Field:scores/] |
Comment Score |
|
[Field:goodpost/] |
Praise |
|
[field:badpost/] |
Poor reviews |
* |
[Field:description/] |
Profile equivalent to [field:info/], [Field:infos/] Word Count control [field:description function= "Cn_substr (@me, 120)"/] 60 kanji Infolen= ' 160 ' indicates that the description length is equivalent to Infolength (control only infos, not control the contents of description) |
* |
[Field:info/] |
Profile equivalent to [field:description/], [Field:infos/] Word Count control [field:info function= "Cn_substr (@me, 120)"/] 60 kanji Infolen= ' 160 ' indicates that the description length is equivalent to Infolength (control only infos, not control the contents of description) |
* |
[Field:infos/] |
Profile equivalent to [field:info/], [field:description/] Word Count control [Field:infos function= "Cn_substr (@me, 120)"/] 60 kanji Infolen= ' 160 ' indicates that the description length is equivalent to Infolength (control only infos, not control the contents of description) |
|
[Field:filename/] |
Article connection address equivalent to [field:arcurl/] |
* |
[Field:arcurl/] |
Article link address equivalent to [field:filename/] |
* |
[Field:textlink/] |
Article title + address equivalent to <a href= ' [field:arcurl/] ' >[field:title/]</a> |
* |
[Field:litpic/] |
The thumbnail address is equivalent to [field:picname/] |
* |
[Field:picname/] |
The thumbnail address is equivalent to [field:litpic/] |
* |
[Field:image/] |
Equivalent to Imgwidth= ' 120 ' thumbnail width imgheight= ' 90 ' thumbnail height |
* |
[Field:imglink/] |
Equivalent to Imglink = <a href= ' [field:arcurl/] ' >[field:image/]</a> |
* |
[Field:typename/] |
Column title |
* |
[Field:typeurl/] |
Column Address |
* |
[Field:typelink/] |
Equivalent to <a href= ' [field:typeurl/] ' >[field:typename/]</a> |
|
[Field:plusurl/] |
Pius folder address is equivalent to [Field:global name=plusurl/] |
|
[Field:memberurl/] |
The Member folder address is equivalent to [Field:global name=memberurl/] |
|
[Field:templeturl/] |
Template folder address equivalent to [Field:global Name=templeturl/] |
* |
[Field:global name=autoindex/] |
The most commonly used underlying tags, generate sequential numbers 1,2,3,4,5,6,7 ..... CSS control can be made into a variety of style effects, such as interlaced color, the list to add 1-10 number of numbers, every few lines of line change and so on In PHP collocation, can produce a variety of effects, for Dede one of the most important code |
|
Transferred from: http://blog.sina.com.cn/s/blog_6919f09001012zzi.html
Common methods of calling Dede weaving dreams