This article describes the PHP for the regular template engine and Css/json conflict resolution, has a certain practical value, the specific analysis is as follows:
This article mainly aims at the object for Smarty and Dwoo
In Smarty, there is often a situation where there is a conflict with the CSS/JS syntax, because both require braces {}. Although you can change the smarty definition, it is not cost-effective to modify all the relevant code in an existing system. The workaround is as follows:
1. Avoid simultaneous occurrence
avoided by means of external references. The problem is to avoid the absence of shelter. So this situation is only suitable for a few simple situations.
2. Modify the Smarty definition character
3. You can surround style sheet information with the Smarty literal tag , as follows:
In contrast, the third method is undoubtedly green, in the face of conflict, plus literal tag package.
The scheme is also effective for dwoo engines.