When you use the $ this-& gt; display () command to output the default template, the output template path is added with the group name: template output
After the project group is enabled, the template output path is different from the original one.
Default output
When you use $ this-> display ()
When the default template is output, the output template path is added with the group name:
TPL/template default topic/group name/module name/operation name + template suffix
- // Example:
- Tpl/default/Admin/User/view.html
Because the project group name is added to the output template path, the corresponding template directory also changes. for details, refer to ThinkPHP
Project Group Directory structure description.
Templates that output other operations of the current module
The format remains unchanged:
$ This-> display ('Operation name ');
Outputs other modules and Operation templates of the current group project
Format:
- $ This-> display ('Module name: Operation name ');
- // Or:
- $ This-> display ('Module name/operation name ');
- // Example:
- $ This-> display ('Article/add ');
Output other group Project templates
Format:
- $ This-> display ('group name: module name: Operation name ');
- // Or:
- $ This-> display ('group name: module name/operation name ');
- // Example:
- $ This-> display ('Home: Article/read ');
-
- $ This-> success ()
For built-in systems:
$ This-> success ();
$ This-> error ();
The template corresponding to these two operations is success.html(error.html) under the Tpl/default/Public directory ).
Read more
ThinkPHP
Template output display method