I have a “view” page in Yii.
It is cached with page cache.
Now, I want to insert some dynamic content:
$this->renderDynamic('renderPartial','view_name');
The rendered view looks like this:
<?php some code ?>
<div>...some html...</div>
The code works fine, but there is this error:
<###dynamic-0###>
So I understand the html is being echoed instead of returned.
I try to pass the return=true to the renderPartial function.
What is the right syntax to do it?
More info: http://www.yiiframework.com/doc/api/1.1/CController#renderDynamic-detail
Cached view file:
Controller file (callback function):
Dynamic view file:
I think that You forgot to add return in callback function (step 2).