DedeCms template installation/production Overview

Source: Internet
Author: User

◆ DedeCms template installation/production Overview:

--------------------------------------------------------------------------------

The template of the DedeCms system is non-fixed. You can select the topic template when creating a new topic. The official website only provides the most basic default template, which is the template of the built-in system model, because DedeCms supports the custom channel model, after you customize the new channel model, you need to design a new template based on the fields of the model. In addition, DedeCms also supports the use of templates in the form of styles, the default style is default, which indicates that the system uses the template of the cmspath, templets, and default folder by default. If you download a new template, you do not need to delete the original default file, name the downloaded template folder with the style name you want, such as style2, and change the default template style name to style2 in the background, the system uses the templets/style2 file as the default template. However, if you manually specify the topic template location, the background parameter style definition is invalid.

I. Concepts, design and use templates. the following concepts must be understood:

1. Plate (cover) template:
It refers to the template used by the website's main page or relatively important barrier. Generally, the template index_id.htm is used to identify id.htm. In addition, the plate template tag can be selected for a single page or custom tag defined by the user separately. If yes, the system uses the plate template marking engine to parse the output content or generate a specific file.
2. List template:
A template for the list of all articles in a topic of a website. It is generally named after javaslist_ id.htm.
3. file template:
Indicates the template of the document view page, such as the document template, which is generally named after “article_id.htm.
4. Other templates:
Generally, the system includes the following templates: homepage templates, search templates, RSS, and JS compilation function templates. In addition, you can customize a template to create any file.

Ii. Naming. The default naming rules for DedeCms templates are as follows:

1. template storage location:
Template Directory: cmspath/templets/style name (default in English, where system is the underlying template of the system, and plus is the template used by the plug-in)/specific function template file}
2. Template File naming rules:
(1)index_ id.htm: indicates the section (column cover) template;
(21_list_id.htm: indicates the topic list template;
(3)article_ id.htm: indicates the content view page (document template, including the topic view page );
(4)search.htm: search result list template;
(5)index.htm: homepage template;

Note: [identification ID] can be obtained in "channel model management". Of course, you can also determine the Template Name of a channel in "channel model management.

For example, list_image.htm indicates that it is the default list template of the topic whose content type is image set.
Article_article.htm indicates the document view page template.

Iii. Other templates

1. Default underlying Template
Location: cmspath/templets/system
Function: When the default underlying template is not marked, the system automatically calls the corresponding file of this folder as the underlying template.
2. Plug-In directory Template
Location: cmspath/templets/plus
Function: provides comments, links, RSS maps, and Other templates.
3. Member background Template
Location: cmspath/member/templets
Function: Member background template.

Iv. Secondary Development

The main template parsing classes of DedeCms are include/inc_arcpart_view.php, include/inc_arclist_view.php, and include/inc_archives_view.php. These classes work with pub_dedetag.php, if you want to add some functions for document templates, list templates, and plate templates, you can directly modify the ParseTemplet () or ParseTempletsFirst () methods of these classes, and set the tag name, attribute functions that are suitable for the test.


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.