view
Template definitions
Press the view template directory (default view) / [template theme] / name of the controller / action name + suffix stored template.
Template Theme
Each template can have a theme, it only needs an extra layer on the directory structure before view rendering output, we can change the theme template to use by dynamic setting.
|
|
Template assignment
The variables in the controller assigned to assign a template method requires the use of
$ this-> assihn ( 'name' , $ value)
after the assignment {$ name} can be output with the template
if the template to simultaneously output a plurality of variables
|
|
Output in the template as follows:
|
|
If the built-in template engine, you can use:
|
|
The output of the same content.
Template Rendering
Template assignment must be operated before rendering the template
Render the template output the most commonly used method is to use the display, call format:
|
|
Acquisition module Address
In order to facilitate the output of the template, a new version of the package used to generate the T function template file name.
|
|
Access to content
If you need to get the output content rendering template rather than a direct output, you can use fetch method.
|
|
If you do not define any template file, or the contents of the template stored in the database, you will need to show the way to render output
|
|