Dedecms template Common call tag code collation _DEDECMS

Source: Internet
Author: User
Tags tag name

1, the most recent document List 1-5 is the call of the Arclist label

{dede:arclist typeid= ' titlelen= ' row= ' col= ' 1 '}
? <a href= ' [field:arcurl/] ' >[field:title/]</a><br>
{/dede:arclist}

2, the latest picture list

{dede:arclist typeid= ' 0 ' titlelen= ' row= ' 2 ' col= ' 4 ' imgwidth= ' ' imgheight= ' 90 '}
<table width= ' border= ' 0 ' align= ' center ' cellpadding= ' 2 ' cellspacing= ' 1 ' bgcolor= ' #E6EAE3 ' >
&LT;TR align= ' center ' >
&LT;TD bgcolor= ' #FFFFFF ' >[field:imglink/]</td>
</tr>
&LT;TR align= ' center ' >
&LT;TD height= ' bgcolor= ' #F8FCEF ' >[field:textlink/]</td>
</tr>
</table>
{/dede:arclist}

3. List of recommended documents

{dede:arclist typeid= ' type= ' commend ' titlelen= ' row= ' col= ' 1 '}
? <a href= ' [field:arcurl/] ' >[field:title/]</a><br>
{/dede:arclist}

4. List of popular documents

{dede:arclist typeid= ' orderby= ' click ' titlelen= ' row= ' col= ' 1 '}
? <a href= ' [field:arcurl/] ' >[field:title/]</a><br>
{/dede:arclist}

5, the latest topic list

{dede:specart typeid= ' titlelen= ' row= ' col= ' 1 '}
? <a href= ' [field:arcurl/] ' >[field:title/]</a><br>
{/dede:specart}
but also:
{dede:arclist typeid= ' type= ' spec ' titlelen= ' row= ' col= ' 1 '}
? <a href= ' [field:arcurl/] ' >[field:title/]</a><br>
{/dede:arclist}

6, column list see Dedecms template Installation/Production Overview page 6th.
The pear blossom and the Temple section under the Focus column

{dede:channel typeid= ' 1 ' type= ' son '}
<a href= "[field:typelink/]" >[field:typename/]</a>
{/dede:channel}
but also:
{dede:channel type= ' top '}
<a href= "[field:typelink/]" >[field:typename/]</a>
{/dede:channel}

7, Custom Tags

{dede:mytag typeid= ' name= ' tag name ' ismake= ' 0 '/}

8. System Variables

{dede:global name= ' variable name '/}
Common variables: cfg_webname (website name), Cfg_cmspath (CMS installation directory), Cfg_templeturl (template URL), cfg_phpurl (plugin URL)

9. Introduction of a document

Use tags: include, code: (file filename ismake whether to include template tags, if included with ismake= ' yes ')
{dede:include file= ' filename ' ismake= '/}

List template Tags
1. Voting management

{dede:vote id= ' 1 ' lineheight= ' 22 '
Tablewidth= ' 100% ' titlebgcolor= ' #EDEDE2 '
titlebackground= ' tablebgcolor= ' ' #FFFFFF '}
{/dede:vote}

2, Friendship Links

If you want to display only the attribute "first" link, please add the Linktype=2 property
Display all audited links in text form

{dede:flink type= ' textall ' row= ' 4 ' col= ' 6 ' titlelen= '
Tablestyle= ' width=100% border=0 cellspacing=1 cellpadding=1 '/}
Type= ' Textall,textimage,text,image '

3, Site News

{dede:mynews row= ' 1 ' titlelen= ' 24 '}
[field:title/] ([field:writer/]| [Field:senddate function= ' GetDate ("@me") '/])
&LT;HR size=1>
[Field:body/]
{/dede:mynews}

Document Template Markup

A document template is a template for a document View page, that is, a cmspath/templets/article_*.htm
When editing a template, insert the template code in HTML mode.
See Dedecms template Installation/Production Overview: Common special function code

Other templates
1, 2 topic list template, search list template

(1) Define list size

{dede:page pagesize= ' result bar per page '/}
DEDECMS 3.1 Lit The above version, you can define this property directly in the list tag

(2) Pagination Document List

{dede:list col= ' titlelen= '
infolen= ' imgwidth= ' imgheight= ' orderby= ' pagesize= '}{/dede:list}
List fixed underlying template variable (that is, [field:name/]): See Dedecms Template Installation/Fabrication Overview page 11th.
The list tag allows any field in the additional table to be used as the underlying variable, but is configured in the channel model.

(3) Define pager tags: see dedecms template Installation/Fabrication Overview page 12th.

{dede:pagelist listsize= ' 3 ' listitem= ' Index,pre,pageno,next,end '/}

3. System template Mark

1. Global Mark

{dede:global name= ' variable name '/}

2, DataList Mark General usage is

{Dede:detalist}
[Field: Fields/] ....
{/dede:detalist} 

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.