In the view file, such as the view file of user.php.
urlManager; $this->title = '业务员列表'; $this->params['active_nav_group'] = 2; ?>
(Related tutorial recommendation:yii framework)
Use:
render('@app/views/layouts/paginator.php',['pagination'=>$pagination]);?>
for introduction. It should be noted that the output statement is used before render. Echo displays the content of the subtemplate. The parameters are used in the same way as in the action. The @app template variable represents the main folder.
The sub-template code is as follows:
共= $pagination->totalCount ?>条数据
For more programming-related content, please pay attention to theProgramming Tutorialcolumn of the php Chinese website!
The above is the detailed content of How to introduce other templates into the content template page in yii2. For more information, please follow other related articles on the PHP Chinese website!