The uchome template file is located in the/template folder. Each template file has a separate folder. The default template folder is default.
1. template usage Configuration
Configure in config. php under the root directory to determine the template used by the system, as shown below:
| De> De> |
De> $ _ SC De> De> [ De> De> 'template' De> De>] = De> De> 'default' De> De>; De> DE> // select the template directory De> |
2. Processing templates
When the template file is used in the program, first go to the template cache directory/DASearch for template cache files under TA/tpl_cache. The template cache file name should be "template _ template directory name_template file name. php ". If yes, the cached template file is used directly. If no, the corresponding template file is parsed and the template cache file is generated before use.
3. template Parsing
Template Parsing is implemented by calling the parse_template function in the function_template.php file under the/source directory.
When reading the template file (.htm), replace the regular expression with the corresponding PHP code, generate a standard PHP file, and save it to the template cache directory/DATa/tpl_cache/for later use.