DedeCms template Learning 1

Source: Internet
Author: User

1. DedeCms template tag

{Dede: Tag Name attribute = 'value '/}
{Dede: Tag Name attribute = 'value'} {/dede: Tag name}
{Dede: Tag Name attribute = 'value'} custom style template (InnerText) {/dede: Tag name}

 

2. You do not need to delete the original template when creating a new template. The default template uses the {cmspath}/templets/default folder (where system is the underlying template of the system and plus is the template used by the plug-in ), you can change the default template style name to style2 in the background in the {cmspath}/templets/style2 folder. However, if you manually specify the column template location, the background parameter style definition is invalid.

3. Several common templates

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: homepage template, search template, RSS, JS compilation function template, etc. In addition, you can customize a template to create any

File.

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.

4. Tag Secondary Development

You can use the background [TEMPLATE]-[tag code management] and click "Add a new tag" to create your own tag.

The tag file name is. 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 you modify a tag, you can also modify its name (change the file name and function name at the same time). This is equivalent to creating a new tag by inheriting the code of the original tag.

.

 

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.