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!
Statement of this 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
Template replacement can be implemented in Dedecms through the following steps: modify the global.cfg file and set the required language pack. Modify the taglib.inc.php hook file and add support for language suffix template files. Create a new template file with a language suffix and modify the required content. Clear Dedecms cache.
Dedecms is an open source CMS that can be used to create various types of websites, including: news websites, blogs, e-commerce websites, forums and community websites, educational websites, portals, other types of websites (such as corporate websites, personal websites, photo album websites, video sharing website)
How to upload local videos using Dedecms? Prepare the video file in a format that is supported by Dedecms. Log in to the Dedecms management backend and create a new video category. Upload video files on the video management page, fill in the relevant information and select the video category. To embed a video while editing an article, enter the file name of the uploaded video and adjust its dimensions.
Dedecms is an open source Chinese CMS system that provides content management, template system and security protection. The specific usage includes the following steps: 1. Install Dedecms. 2. Configure the database. 3. Log in to the management interface. 4. Create content. 5. Set up the template. 6. Manage users. 7. Maintain the system.
DedeCMS is an open source content management system that has some potential vulnerabilities and security risks: 1. SQL injection vulnerability. Attackers can perform unauthorized operations or obtain sensitive data by constructing malicious SQL query statements; 2. File Upload vulnerability, attackers can upload files containing malicious code to the server to execute arbitrary code or obtain server permissions; 3. Sensitive information leakage; 4. Unauthenticated vulnerability exploitation.
Accurate and reliable dedecms conversion tool evaluation report With the rapid development of the Internet era, website construction has become one of the necessary tools for many companies and individuals. In website construction, using a content management system (CMS) can manage website content and functions more conveniently and efficiently. Among them, dedecms, as a well-known CMS system, is widely used in various website construction projects. However, sometimes we are faced with the need to convert the dedecms website to other formats, in which case we need to use a conversion tool
Learning dedecms encoding conversion function is not complicated. Simple code examples can help you quickly master this skill. In dedecms, the encoding conversion function is usually used to deal with problems such as Chinese garbled characters and special characters to ensure the normal operation of the system and the accuracy of data. The following will introduce in detail how to use the encoding conversion function of dedecms, allowing you to easily cope with various encoding-related needs. 1.UTF-8 to GBK In dedecms, if you need to convert UTF-8 encoded string to G