This article mainly introduces PHP's solution to conflicts with CSSJSON in the conventional template engine, which is very practical, for more information about PHP's solution to conflicts with CSS/JSON in the conventional template engine, see the following example:
This article mainly targets Smarty and Dwoo
There is often a conflict between Smarty and CSS/JS syntax, because both must use braces {}. Although you can change the definition of Smarty, it is not cost-effective to modify all the relevant code in an existing system. The solution is as follows:
1. avoid simultaneous appearance
Avoid using external references. The problem is that it is unavoidable. Therefore, this situation is only suitable for a few simple cases.
2. modify the Smarty identifier
3. you can use the literal tag of Smarty to enclose the style sheet information., As shown below:
{$ Title}{Literal}
P {margin: 2px} {/literal}