herun1988
(Herun1988)
1
Hi, I’m new to Yii. It is a grate framework!
Now I want to assign a page content, which is rendered by “$this->renderPartial(’_view’);”, to a variable, sth like:
$a = $this->renderPartial(’_view’); (Just to show my idea)
Anyone knows how to do this? Thanks!
One possible approach is to override the renderPartial() method to make it able to return pure HTML string.
Hope this help
Angelo
softark
(Softark)
3
According to the reference, you can do it like the following:
$a = $this->renderPartial('_view', NULL, true);
CController::renderPartial
herun1988
(Herun1988)
4
Thanks! It should work! I will try it on Monday.
herun1988
(Herun1988)
5
It proved work! Thank you guys!