Reputation: 3309
I have a component with comment name. this component has a view file with test.php
name.
I would like to render another view file in test.php. How I can do this?
file map:
component/
|
comment.php
view/
|_
test.php
another.php
Upvotes: 0
Views: 1581
Reputation: 5716
You can simply do it this way to have multiple views.
$this->render('view1', array('model' => $model));
// then, inside the view you can render a subview like this:
$this->renderPartial('view2', array('model' => $model));
Hope this helps you.
Upvotes: 1