Processing of supesite tag data sources and page tag definition skills

Source: Internet
Author: User
In the developed CMS system, the development of template engines and labels has come to an end. In the discuz CMS system supesite, many things have been learned, with a slight note. Good memory is never as good as a bad keyboard.
To resolve a page to a static page, you must use the template engine to parse the tag. The definition of the tag data source is worth studying.
In the previous tag design, because data storage uses a dynamic model, Tag Parsing is not involved in multiple tables. In later development, more and more tables are separated from dynamic models, and data parsing for each table requires defining a tag data source and assigning values to each data source, finally, the template engine is parsed. Some time ago, I downloaded a supesite construction system for research, and found that its design is very exquisite.
In its system design, there is something called "module Management". It manages all data sources in a unified manner, so that the data read can be customized and reused.
The following assumptions: to read the content of a subchannel from the information channel, and the content must meet certain query conditions. As a tag data source, the template engine parses the content and displays it on the page.

▼ Supesite has been set to wizard mode. Select "info"

 

Blocks generated by the producerCodeNote that the cachename is the data source name. Obviously, supesite caches the data source. You can configure the Update Interval in the cache settings. Name is a unique identifier.

 

Call on the renewal page

 

We also found that the supesite tag DefinitionMeticulousPlace the tag with <! -->, The benefits of doing so are obvious. When a template engine error or preview a template is placed between HTML comments, the page structure is not damaged and is well designed.
The supesite design completely transfers user requirements to users, allowing users to customize data sources to meet various needs, and it is extremely convenient to maintain data sources.
Supesite is designedOne disadvantage: After the block content is modified, all pages that reference the block need to be modified. Since a unique block name already exists, you only need to enter the name for the data source on the page, the specific data reading parameters use the database for one-to-one correspondence. After the Data Reading parameters corresponding to the name are modified, the name on the page does not need to be changed, so the template does not need to be adjusted at all, I don't know how supesite is designed to consider this.
In my current system, I have applied this design idea to the current data source management, and corrected a design defect of supesite, which can perfectly meet various special query requirements, once and for all.

Continuous thinking, continuous learning, and progress can be fast!

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.