jamie is right On 16 Sep., 21:04, "j.blotus" <[email protected]> wrote: > @Jamie > +10 internets, kind of what I wanted to say about it as well. > > On Sep 16, 2:37 pm, Jamie <[email protected]> wrote: > > > > > There's no need for all of the extra overhead there. Lots (lots!) of > > MVC frameworks "allow" the view to read data. There's nothing wrong, > > in my opinion, with using Configure::read() from a view. You're not > > inserting/deleting/updating data (the model) and you're not > > manipulating it (the controller). You're just displaying it. That's > > what the view is for... displaying data. Passing it through the > > controller and assigning it another variable is just a waste of > > resources. > > > Yes, it is still just layout logic. You're not doing anything with the > > data other than displaying it. > > > - Jamie > > > On Sep 16, 12:34 am, Tilen Majerle <[email protected]> wrote: > > > > ok, i agree with both of you...i simply use helper with "config" method > > > and > > > then parameter is "key" and i get value from Configure::read(); > > > -- > > > Tilen Majerlehttp://majerle.eu > > > > 2010/9/16 Zaky Katalan-Ezra <[email protected]> > > > > > I agree with �...@miles J. > > > > Config values are data and as such should not be part of the view. > > > > What if you move the config value from the config file to the database? > > > > Instead of changing one controller file you need to change several > > > > views. > > > > > >"If you needed to read the config on every page I would put in > > > > >into AppController::beforeFilter as you suggested, but for a one shot > > > > >deal I would just call from the view statically" > > > > > As a rule of thumb do things in one way when you can, its more > > > > maintenance > > > > friendly. > > > > I think that the view should contain only layout logic. > > > > You can do loop statements but the loop body should contain only layout > > > > logic. > > > > Configure READ a config file which is not a layout logic. > > > > > If there is an indecision here is whether to call configure from the > > > > controller or from the model which should be responsible for data > > > > fetching. > > > > > <http://www.google.com/search?q=If%20y> > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers > > > > 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]<cake-php%[email protected] > > > > om>For more options, visit this group at > > > >http://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
