php - CakePHP: How to use a view element inside of a controller -
i'm trying figure out how use 1 of view elements inside of controller...
i know, know: "don't that!" (99% of time correct answer)
but think have reason. action handling ajax request returns markup. returned markup list display everywhere else using element. in effort keep code dry, think it's appropriate here.
is possible?
easy:
$view = new view($this, false); $content = $view->element('my-element', $params);
also:
don't anymore!!!
Comments
Post a Comment