DEDECMS system template is non-fixed, the user can be in the new column can choose the column template, the official only provide the most basic default template, that is, the built-in system model of the various templates, because DEDECMS support the custom channel model, the user to customize the new channel model, Also need to follow the model of the field design a new set of templates, in addition, DEDECMS also support DEDECMS system template is non-fixed, users can in the new column can choose their own column template, the official only provide the most basic default template, which is the built-in system model of the various templates, Since DEDECMS supports a custom channel model, when users customize the new channel model, they also need to design a new set of templates according to the model's fields, and Dedecms also supports the use of the template in style, which is default style, which means that the system uses {cmspath}/by default. Templets/default This folder template, if you download a new set of templates, you can not have to delete the default original 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 called Style2, the system will use {Cmspath}/templets/style2 This file as the default template, but if you manually specify the location of the column template, the definition of background parameter style is invalid.
first, concept, design and use of templates, must understand the following several concepts
1, plate (cover) Template:
Refers to the website homepage or the more important section cover channel uses the template, generally uses "Index_ recognizes id.htm" The name, moreover, the user individual definition individual page or the custom mark, also may choose whether supports the plate template mark, if supports, The system will use the plate template tag engine to parse and then output the content or generate a specific file.
2. List template:
A template that refers to the list of all articles in a section of a website, usually named "List_ recognition id.htm".
3. File Template:
A template that represents a document viewing page, such as an article template, is typically named "Article_ recognition id.htm".
4. Other templates:
General system general includes templates include: Homepage template, search template, rss, JS compile function template, etc., in addition, users can also customize a template to create any file.
second, naming, dedecms template default naming rules are as follows
1. Template Save Location:
Template directory: {cmspath}/templets/style name (default, the system is the underlying template, plus the template used by the plugin)/specific feature template file}
2. template file naming specification:
(1) index_ identification id.htm: Represents the plate (column cover) template;
(2) List_ recognition id.htm: Indicates the column list template;
(3) Article_ recognition id.htm: Indicates content viewing page (document template, including thematic view page);
(4) Search.htm: Search result list template;
(5) Index.htm: homepage template;
NOTE: [identification ID] can be obtained from "channel Model Management", and of course, you can also identify the template name for a channel in the "Channel Model Management" area.
Cases:
List_image.htm is the default list template for the column with the content type as the picture set.
Article_article.htm represents the Article view page template.
Third, other template description
1. 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 in this folder as the underlying template.
2. Plugin Catalog Template
Location: {Cmspath}/templets/plus
Features: Comments, links, RSS maps and other templates.
3, Member background template
Location: {cmspath}/member/templets
Function: The template of the member backstage.
四、二次 Development
In V5.5, the label development has been separated, you can use the background [template]-[tag Code Management], click on the "new Add a new label" to create a label, tag file name: Tag name. lib.php
The interface function is defined as: function lib_ tag name (& $ctag,& $refObj), the return value is the result string
To prevent errors when modifying a label, you can also modify its name (and also modify the file name and function name) so that the code that inherits the original tag creates a new tag.
Dede main template file and function description