


yii uses renderPartial to call the view of another controller_PHP tutorial
Jul 13, 2016 am 10:29 AMThe following are some of the experiences we gained when developing projects at Xinyi Network company
We can use renderPartial to access partial view files stored in the views folder of a different controller.
In Yii1.1.3, we use double slashes "//", and the program will start searching from the view folder, for example:
protected/views/library/_book.php
renderPartial('//library/_book', array('books'=>$books))
If you use a single slash "/" to start the search, the program will jump out of the current active module and search from the application's view path.
This article is published by Xinyi Network, which specializes in website construction in Chengdu. For more information about yii, please pay attention to Xinyi Network’s subsequent releases. Xinyi Network’s official website is http://www.ir58.com

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Huawei teamed up with Chengdu High-tech to control TD Tech with 100% equity, but the 2.12 billion sale of Nokia failed to reach

How to use PHP framework Yii to develop a highly available cloud backup system

Yii2 vs Phalcon: Which framework is better for developing graphics rendering applications?

Symfony vs Yii2: Which framework is better for developing large-scale web applications?

Data query in Yii framework: access data efficiently

'Jian Wang 3' new style 'Guangdu Town' visual effects upgrade

Are there any experts? 'It's over!' I'm Surrounded by Beauties' prequel DLC (Chengdu chapter) revealed
