In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces what are the main template files and functions of DedeCMS. It is very detailed and has a certain reference value. Friends who are interested must read it!
The template of the DedeCMS system is not fixed, and users can choose the column template when creating a new column. Officially, only the most basic default template is provided, that is, each template of the built-in system model. As DedeCMS supports custom channel model, users need to design a new set of templates according to the fields of this model after customizing the new channel model.
In addition, DedeCMS also supports the use of style in the form of templates, the default style is default, it means that the system default uses {cmspath} / templets/default this folder template, if you download a new set of templates, you can not delete the original default files, the download template folder named the style you want.
Such as style2, and then modify the default template style name to style2 in the background, then the system will use the file {cmspath} / templets/style2 as the default template, but if you manually specify the location of the column template, the definition of background parameter style is invalid.
Concept, design and use of templates, it is necessary to understand the following concepts
1. Plate (cover) template:
Refers to the site home page or more important column cover channel using the template, usually named with "index_ recognition ID.htm", in addition, the user defines a single page or custom tag, you can also choose whether to support plate template tags, if so, the system will use the plate template marking engine to parse the content or generate a specific file.
2. List template:
Refers to the template for a list of all articles in a column of a website, usually named "list_ recognition ID.htm".
3. File template:
A template that represents a document view page, such as an article template, is generally named after "article_ recognition ID.htm".
4. Other templates:
The templates commonly included in the general system are: home page template, search template, RSS, JS compilation function template, etc., in addition, users can also customize a template to create any file.
2. Naming. The default naming rules for DedeCMS templates are as follows
1. Where to save the template:
Template directory: {cmspath} / templets/ style name (English, default is default, where system is the underlying template of the system, plus is the template used by the plug-in) / specific feature template file}
2. Template file naming convention:
(1) index_ recognizes ID.htm: indicates the template of the plate (column cover)
(2) list_ recognizes ID.htm: indicates the column list template
(3) article_ recognizes ID.htm: indicates content view page (document template, including thematic view page)
(4) search.htm: search results list template
(5) index.htm: home page template
Note: [identify ID] is available in "Channel Model Management". Of course, you can also determine the template naming of a channel in "Channel Model Management".
Example: list_image.htm indicates that it is the default list template for columns whose content type is a 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 the default underlying template of the tag is not specified, the system will automatically call the corresponding file of this folder as the underlying template.
2. Plug-in directory template
Location: {cmspath} / templets/plus
Functions: comments, links, RSS maps and other templates.
3. Member backend template
Location: {cmspath} / member/templets
Function: member backstage template.
Fourth, secondary development
Tag development has been separated in v5.3. You can create your own tag through "template"-"tag Code Management" and click "add a new tag". The tag file name is: tag name. Lib.php
The interface function is defined as: function lib_ tag name (& $ctag,&$refObj), and the return value is the result string
To prevent errors when modifying a tag, you can also change its name (both the file name and the function name), which is equivalent to the code that inherits the original tag to create a new tag.
The above are all the main template files and functions of DedeCMS. Thank you for your reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.