Dedecms main template file and function description

Source: Internet
Author: User
Keywords Dedecms main template file function description

Dedecms system template is not fixed, users can choose a new column template, the official only provide the most basic default template, that is, the built-in system model of the various templates, because the DEDECMS support custom channel model, users customize the new channel model, You also need to design a new set of templates by the fields of the model, and DEDECMS also supports the use of styles in the form of templates, default style defaults, which means that the system defaults to using the {Cmspath}/templets/default template for this folder. If you download a new set of templates, you can not have to delete the original default file, the download template folder name you want the style name, such as Style2, and then in the background modified the default template style name for Style2, that system will use {cmspath}/ Templets/style2 This file as the default template, but if you manually specify the location of the column template, the background parameter style definition is invalid.
&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp;
concept, design and use of templates, you must understand the following concepts

1, plate (cover) Template:
Refers to the website homepage or the more important column cover channel uses the template, generally uses "index_ recognition id.htm" The name, moreover, the user individual definition individual page or the custom mark, also may elect whether supports the plate template marking, if supports, The system uses the plate template tag engine to parse before outputting the content or generating a specific file.
2. List template:
A template that refers to the list of all articles in a section of a Web site, usually named "List_ recognition id.htm".
3, File Template:
A template that represents a document view page, such as an article template, which is typically named "Article_ recognition id.htm."
4, other templates:
General system general includes templates include: Home page template, search template, rss, JS compile function template, in addition, users can also customize a template to create arbitrary files.

Second, name, dedecms template default naming rules are as follows

1, the template save location:
Template directory: {cmspath}/templets/style name (English, default defaults, where system is the underlying template, plus template used for Plug-ins)/specific feature template file}
2, template file naming norms:
(1) index_ recognition id.htm: The plate (column cover) template;
(2) List_ recognition id.htm: the column list template;
(3) Article_ recognition id.htm: Content View page (document template, including topic View page);
(4) Search.htm: Search results list template;
(5) Index.htm: homepage template;

NOTE: [identification ID] can be obtained from the "channel Model Management" location, but you can also identify the template naming for a channel in the "Channel Model Management" location.

Example: List_image.htm is a column default list template with a content type that is a picture set.
Article_article.htm represents the Article view page template.

Third, other template description

1, the default underlying template
Location: {Cmspath}/templets/system
Function: When you do not specify the default underlying template for the tag, the system will automatically call the corresponding file for that folder as the underlying template.
2, Plug-in directory template
Location: {Cmspath}/templets/plus
Features: Comments, links, RSS maps and other templates.
3, the member backstage template
Location: {cmspath}/member/templets
Function: Member backstage template.

四、二次 Development

V5.3 has been separated from the label development, you can use the background [template]-[tag Code Management], click on "New Add a new label" to create a own label, the label file name: Tag name. lib.php
The interface function is defined as: function lib_ label name (& $ctag,& $refObj), return value is result string
To prevent errors when modifying a label, you can also modify its name (while modifying the file name and function name) so that the code that inherits the original label creates a new label.

Related Article

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.