How to change the Web site template call css file skin change

Source: Internet
Author: User

The flexibility of this method is relatively high, each skin can have its own layout, has its own personality. Implementation: For example, the template has an identity $subject, the program code will replace it with the article title, and then have a block <!-loop[articlelist]-->


Typically, we cache the content of the read template, but the replacement of the string is always unavoidable, or the replaced content is also cached, but this is tantamount to caching the template content and the replaced content, taking up two of the seemingly repetitive content of memory.


Advantages: The flexibility of the template is very high, you can arbitrarily change the layout of the page.


Disadvantages: Impact performance, developer maintenance difficult, must have a specific identifier to represent page variables, later maintenance may cause a lot of problems.


How to change the Web site template call css file skin change


This one, strictly speaking, should not be counted as a skin mechanism. Although the CSS is very powerful, can also through it to arbitrarily change the layout of the page elements, but its HTML is always the same, so the limitations are very large.


Advantages: No effect on performance, even can not be managed by the service-side code to manage its transformation, you can use JS to switch skin.


Disadvantage: If as the core skin mechanism, very limited.

Related Article

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.