chrisstump
3/19/18 at 3:29 pm
PHP
yii
Rendering Partials in Yii
Make your code more efficient with the use of partials in Yii.
// use $this->renderPartial to include a partial in your layour or view // the first argument in this method is the name of the partial // the second argument is an array of parameters to pass to the partial, in this case we can use the variable $message in the alert partial. $this->renderPartial('_alert', array('message'=>$message));
Copy Snippet to Clipboard
Don't Have an Account?
Stop digging through old code examples. Get organized. Get Code Snipper.
Learn More
Start Free 14 Day Trial