Search the Community
Showing results for tags 'view'.
-
version 0.5 Page 113 Quoting from the book: "The view files generated by Gii have comments at the top of them that indicate the variables that were passed to the view file. For protected/views/site/index.php, that’s: <?php /* @var $this SiteController */ For protected/views/user/create.php, you’ll see: <?php /* @var $this UserController */ /* @var $model User */ " My question: What actual variables are passed? Is SiteController a variable? Is UserController a variable? What exactly does "$model User" mean? Thanks.
-
Version 0.5 page 157 Quote: "# protected/controllers/SiteController.php public function actions() { return array( 'page' => array('class' => 'CViewAction', 'defaultView' => 'about') ); } To change the layout used to encase the view, assign the alternative layout name to the layout attribute in that array." Larry, I understand the example, but not the last sentence. It doesn't seem to relate to the example. Can you please explain it in other words? Thanks.
-
Version 0.5 Page 125 Larry, please provide and example to show us how this would work: "{TIP} Most of the time you use renderPartial() within one view file, you’ll want to pass along the variables it received to the other view file." Thanks.
- 1 reply
-
- renderpartial
- pass
-
(and 3 more)
Tagged with: