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.