View is for templating logic, not for business logic. It should be
passed down from the controller.
I usually just do this in my beforeFilter().
$this->set('config', Configure::read('foo'));
On Sep 15, 2:06 pm, "j.blotus" <[email protected]> wrote:
> @Jeremy
> I would have to disagree about skinny views, because putting stuff in
> the views should help keep clutter out of the controller, which I
> think should be as thin as possible. I think it's a bit inefficient to
> set a variable in the controller that you could just read statically
> in the view, such as Configure::read().
>
> On Sep 15, 4:51 pm, Jeremy Burns | Class Outfit
>
> <[email protected]> wrote:
> > This is just a wild guess, but I would think that doing it the controller
> > is more efficient than doing it the view? The view is supposed to be as
> > skinny as possible and only contain layout and flow type logic, rather than
> > application control.
>
> > Jeremy Burns
> > Class Outfit
>
> > [email protected]http://www.classoutfit.com
>
> > On 15 Sep 2010, at 21:12, Tilen Majerle wrote:
>
> > > "Do it in the controller action and pass it down as a
> > > variable."....that's second option
> > > --
> > > Tilen Majerle
> > >http://majerle.eu
>
> > > 2010/9/15 Jeremy Burns | Class Outfit <[email protected]>
> > > Do it in the controller action and pass it down as a variable.
>
> > > Jeremy Burns
> > > Class Outfit
>
> > > [email protected]
> > >http://www.classoutfit.com
>
> > > On 15 Sep 2010, at 21:06, xtraorange wrote:
>
> > > > Howdy folks,
>
> > > > I'm trying to access a value via the read method of Configure in my
> > > > layout, but I can't figure out how to do it.
>
> > > > How do I read a configuration value in the layout?
>
> > > > Thanks,
> > > > James
>
> > > > 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 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 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