SoFunction
Updated on 2025-03-10

Organize commonly used call tag code for Dedecms templates

1. Latest document list 1-5 are all called arclist tags

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

2. Latest picture list

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

3. Recommended document list

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

4. Popular Document List

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

5. Latest special topic list

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

6. Column list: See DedeCms template installation/production overview page 6.
The pear blossom meeting and temple fair column 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 (webname), cfg_cmspath (CMS installation directory), cfg_templeturl (template URL), cfg_phpurl (plugin URL)

9. Introduce a file

Use tag: include, code: (file file name ismake Does the template tag contain, if included, use 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. Friendly links

If you want to display only links with attribute "Homepage", please add linktype=2 attribute
Display all reviewed links in text

{dede:flink type='textall' row='4' col='6' titlelen='16' linktype=2
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")'/])
<hr size=1>
[field:body /]
{/dede:mynews}

Document template tags

Document template refers to the template of the document viewing page, that is, cmspath/templets/article_*.htm
When editing a template, please insert the template code in HTML mode.
See DedeCms template installation/production overview: Commonly used special function codes

Other templates
1.2 Topic list templates, search list templates

(1) Define the list size

{dede:page pagesize='Number of results per page'/}
DedeCms 3.1 Lit above versions, you can directly define this property in the list tag

(2) Paging Document List

{dede:list col='' titlelen='' 
infolen='' imgwidth='' imgheight='' orderby='' pagesize=''}{/dede:list}
list fixes the underlying template variable (i.e. [field:name/]): see DedeCms template installation/production overview page 11.
The list tag allows any field in the attached table as the underlying variable, but it must be configured in the channel model.

(3) Define the page navigation mark: see DedeCms template installation/production overview page 12.

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

3. System template marking

1. Global tag

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

2. The general usage of datalist tags is

{dede:detalist}
[field:field/] ...
{/dede:detalist}