Dedecms Common Tags

Source: Internet
Author: User

Index call Tag:

Site title: {dede:global.cfg_webname/}
Site keywords: {dede:global.cfg_keywords/}
Website description: {dede:global.cfg_description/}
Copyright: {dede:global.cfg_powerby/}
Record: {dede:global.cfg_beian/}
Call System Custom global variable: {dede:global:cfg_test}

File reference: {dede:include filename= "footer.htm"/}
Style sheet path: {dede:global.cfg_templeturl/}{dede:global.cfg_templets_skin/}->/dedecms/templets/default
Links: {Dede:flink row= "10"/}
Prevent collection: {Dede:field name= ' body ' function= ' rndstring (@me) '/}

*********************************************************************************
Column Call:

Top-level column invocation:
{dede:channel type= ' top ' row= ' 5 ' 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}

Refers to the Order column call:
{dede:type typeid= ' ID '}
[field:typename/]
{/dede:type}

*********************************************************************************
List page Common label calls:

Column title: {dede:field.title/}-{dede:global.cfg_webname/}
Column keywords: {dede:field name= ' keywords '/}
Column Description: {dede:field name= ' description ' function= ' Html2text (@me) '/}
Column content: {dede:field.content/}
Current column Location bread navigation: {dede:field name= ' position '/}

List of articles in the current section:
{dede:list pagesize= ' = ' pubdate '}

[Field:global.autoindex runphp= ' yes ']
if (@me% 2) = = 0) {
@me = ' <div class= ' Soft-info-lanmu "style=" ">";
}
else{
@me = ' <div class= ' Soft-info-lanmu > ';
}
[/field:global.autoindex]

<a href= ' [field:arcurl/] ' >[field:title/]</a>
[Field:description/]<a href= ' [field:arcurl/] ' >[details]
[Field:pubdate function= "mydate (' y-m-d ', @me)"/]
</a>
{/dede:list}

The current column of the article List page:
{dede:pagelist listitem= "info,index,end,pre,next,pageno,option" listsize= "5"/}

Free list Tag Arclist
{dede:arclist flag= ' h ' typeid= ' row= "col=" titlelen= "infolen=" "imgwidth=" "imgheight=" "listtype=" key word= ' limit= ' 0,1 '}
<a href= ' [field:arcurl/] ' >[field:title/]</a>
{/dede:arclist}

Arclist the method for attaching table fields:
Must specify
1. Specify the Channelid property
2. Specify the field to get addfields= ' field 1, field '
{dede:arclist row= ' 3 ' titlelen= ' typeid= ' 3 ' = ' pubdate ' channelid= ' 3 ' addfields= ' Xtlx,language '}
System fields [field:arcurl/] [field:title/] [field:litpic/] "/]
[Field:pubdate function= "mydate (' y-m-d ', @me)"/]
custom [field:xtlx/] [field:language/]
{/dede:arclist}

**********************************************************************************
Article content page Common tag call:

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 {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/}
Editor: {dede:adminname/}
Previous post: {dede:prenext get= ' pre '/}
Next: {dede:prenext get= ' next '/}
Number of clicks:
<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>
List of page links for the document: {dede:pagebreak/}

To invoke related articles:
{dede:arclist row= ' titlelen= ' orderby= ' hot '}
<li>

<a href= "[field:arcurl/]" >[field:title/]</a>
</li>
{/dede:arclist}

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 perpage= ' titlelen= ' 100 '}
<a href= ' [field:arcurl/] ' >[field:title/]</a>
[Field:pubdate function= "Getdatemk (@me)"/]
[Field:description/]...<a href= ' [field:arcurl/] ' >[details]</a>
<small> click: </small>[field:click/]
<small> Date: </small>[field:stime/]
{/dede:list}

Pagination function specific number of changes required plus/search.php
{dede:pagelist listitem= "info,index,end,pre,next,pageno,option" listsize= "5"/}

Modify the background search interval to 0 system-and performance options
Search function
<form action= "{dede:global.cfg_cmsurl/}/plus/search.php" method= "post" name= "Formsearch" >
<div class= "Form" >
<input type= "hidden" name= "mid" value= "1"/>
<input type= "hidden" name= "Dopost" value= "Search"/>
Keywords: <input type= "text" name= "q"/> <input type= "Submit" name= "Submit" value= "Start full text search"/>
</div>
</form>

********************************************************************************
Other:

Online message function and other forms submission method with V9
Recommended Call: (need to turn off security monitoring)
{dede:sql sql= ' select * from dede_archives where flag like "%h%" Limit 15 '}
<li>
<span class= "No" >[field:global.autoindex/]</span>
<a href= "[field:id runphp= ' yes '] [email protected]; @me ="; $url =getonearchive ($id); @me = $url [' Arcurl ']; [/field:id] "title=" [field:title/] ">
[Field:title function= ' (strlen ("@me") cn_substr ("@me"). "": "@me") '/]
</a>
</li>
{/dede:sql}

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}

Change style by Five elements:
{dede:arclist typeid= ' 1 ' titlelen= ' + ' row= ' typeid= ' "}
<li [Field:global name=autoindex runphp= "yes"] (@me% 5 = = 0)? @me = "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]

Dedecms Common Tags

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.