There are three ways to use: 1. "{dede: tag name attribute = 'value'}"; 2. "{dede: tag name attribute = 'value'} {/dede: tag name}"; 3. "{dede:mark name attribute='value'}custom template (InnerText){/dede:mark name}".
#It is very meaningful to understand the knowledge of Dreamweaver template engine. The template engine is a template parser that uses XML namespaces. The biggest advantage of using the Dreamweaver parser to parse templates is that you can easily specify the attributes of the tag. It feels like using HTML, making the template code very intuitive and flexible. The new version of the DreamWeaver template engine can not only parse the template but also analyze the wrong tags in the template.
1. The code styles of the Dreamweaver template engine have the following forms:
{dede: tag name Attribute='value'/}
{dede:mark name attribute='value'}{/dede:mark name}
{dede:tag name attribute='value'}Custom style template (InnerText){/dede:tag name}
Tips:
If you use a tag with an underlying template, you must strictly use the {dede: tag name attribute ='value'}{/dede:mark name} This format, otherwise an error will be reported.
[Arclist tag]
This tag is the most commonly used tag in DedeCms, also called the free list tag, among which hotart, Coolart, likeart, artlist, imglist, imginfolist, specart, and autolist are all alias tags extended by the different attributes defined by this tag.
Function description: Get the specified document list
Scope of application: Cover template, list template, document template
[1] typeid='' represents the column ID, which generally does not need to be specified in list templates and file templates. In the cover template, "," is allowed to represent multiple columns separately;
[2] row='' means the total number of document lists returned;
[3] col='' means how many columns to display (default is single column);
[4] titlelen='' means the title length
[5] infolen='' represents the content introduction length;
[6] imgwidth='' represents the thumbnail width;
[7] imgheight='' represents Thumbnail height;
[8] type='' indicates the file type, in which a null value, this attribute is not used, or type='all' is a normal document
§ type='commend ', indicates recommended documents, equivalent to {dede:coolart}{/dede:coolart}
§ type='image', indicates documents that must contain thumbnail images, equivalent to {dede:imglist} {/dede:imglist}、{dede:imginfolist} {/dede:imginfolist}
§ When type='spec', it indicates the topic, which is equivalent to the mark {dede:specart}{/dede:specart}
The above attribute values can be used in combination, such as: type='commend image' indicates recommended image documents
[9] orderby='' indicates the sorting method, the default value is senddate, arranged by release time .
§ orderby='hot' or orderby='click' means sorting by the number of clicks
§ orderby='pubdate' means sorting by publication time (that is, the time value that the front desk allows to change)
§ orderby='sortrank' Sort by the new sorting level of the article (use this attribute if you want to use pinned articles)
§ orderby='id' Sort by article ID
§ orderby='postnum' Sort by the number of article comments
§ orderby='rand' Randomly obtain a list of documents with specified conditions
[10] orderway='' The value is desc or asc , specifies whether the sorting method is descending order or forward sorting. The default is descending order.
[11] keyword='' represents a list of documents containing specified keywords, multiple keywords are separated by ","
[12] channelid='' represents a specific channel model ID , built-in channels: topic (-1), article (1), photo gallery (2), Flash (4), software (3)
The above is the detailed content of How to use the dedecms tag. For more information, please follow other related articles on the PHP Chinese website!
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn