@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.

KS

On Jul 15, 12:26 am, Sam <[email protected]> wrote:
> One use I've had for rendering an element in the controller(well, from
> a component actually) is for a form plugin- my users could put a
> bbcode like tag in the body of a page and it would render the proper
> form within their content... normally I would do this processing with
> a helper, but the form fields were stored in the database, which made
> a component a more logical place to retrieve the data and render the
> element.
>
> On Jul 14, 1:17 pm, Nabil Alsharif <[email protected]> wrote:
>
> > It's usually best to have the view render the elements and to pass
> > settings/variables to view  that passes it on to the element.... but
> > to every rule there are exceptions.
>
> > On Wed, Jul 14, 2010 at 1:52 PM, sanedevil <[email protected]> wrote:
> > > Hi Bakers!
> > > Is it ok to render an element from a controller? Or as a best
> > > practice, let the controller always render the view and then in the
> > > view render the element?
>
> > > Thanks! KS
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 [email protected]
> > > To unsubscribe from this group, send email to
> > > [email protected] For more options, visit this group 
> > > athttp://groups.google.com/group/cake-php?hl=en

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 [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to