Home > Article > CMS Tutorial > What are the specifications for the writing format of DreamWeaver template tags?
What are the specifications for the writing format of Dreamweaver template tags?
1. Writing format and precautions for the Dreamweaver template tag:
1. Writing format:
① {dede: tag Name parameter='value' Parameter='value'} Bottom template {/dede:tag name}
② {dede:tag name parameter='value'/}
2. Precautions :
① Label writing must use half-width state;
② For example, the label call in 1-① must have a closed label starting from the label name and exist in the underlying template;
③ For example 1-② there is no underlying template representation, and there is no closing tag; its style is written into the corresponding tag source code.
2. The concept and calling method of the underlying template:
1. What is the underlying template?
The underlying template is not a template! It is the specific content to be displayed on the actual page;
2. Application of the underlying template:
Calling method [field: field name /]
Example:
{dede:arclist row='6' titlelen='20'} <li><a href="[field:arcurl/]" title="[field:fulltitle/]">[field:title/]</a></li> {/dede:arclist}
3. Use of custom macro tags and smart tag wizard
Calling method:
{dede:mytag name='标记名称' ismake='yes/no'/}
4. SQL tag:
1. Introduction to SQL tag:
SQL tag is an advanced application that directly uses SQL query statements to query the database and output it. It is characterized by being more flexible, convenient and powerful
2.SQL tag writing format:
{dede:sql sql="complete SQL query statement"}
[field:field name/]
{/dede:sql}
3. SQL call example:
{dede:sql sql="select * From dede_archives where typeid = 10 limit 0,10"}
[field:title/]
{/dede:sql}
5: Other commonly used tags
1. Question and answer tag ask
{dede:ask row='10' qtype='ok' tid='0' titlelen='40'}
[field: title/]
{/dede:ask}
Parameters:
row: number of items
qtype: question type new commend ok notok high
Bottom field:
tid tidname title url typeurl
2. Friendly link flink
{dede:flink row='10' type='image'/ }
Parameters:
row: quantity
qtype: output type textall text image
titlelen: the maximum number of characters in the site
linktype :Link position 1 is the inner page, 2 is the homepage, 0 is not reviewed
typeid: site type typeid="type ID"
The above is the detailed content of What are the specifications for the writing format of DreamWeaver template tags?. For more information, please follow other related articles on the PHP Chinese website!