Question

afterRender() controller method invokes after render(), but not afterrenderPartial().

Is there a solution?

Was it helpful?

Solution

After calling renderPartial, save return result and call afterRender this way:

$view = 'myView'; // etc
$output = $this->renderPartial($view, array(...));
$this->afterRender($view, $output);

OTHER TIPS

If you need to do it regularly, override renderPartial in a CController class and call afterRender in there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top