On Thu, Jul 15, 2010 at 5:28 PM, sanedevil <sanede...@gmail.com> wrote: > @Nabil, @Sam, > thanks both for your ideas! I believe for consistency sake thruout the > app, i'll stick to the controller->view->element chain (comin from a > J2EE backgrnd, its hard to break conventions and rules :) ) But of > course as you guys suggested, i can excuse myself in certain cases.
I missed this thread earlier but I'll just chime in that I often render elements from the controller. In my case, it's generally for AJAX calls. On normal page load, the View calls the element (say, a paged listing of Users) but, for an AJAX request, only the element needs to be rendered. if ($this->RequestHandler->isAjax()) { $this->layout = false; $this->viewPath = 'elements'.DS.'users'; $this->render('pagination'); } Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en