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 Majerle http://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 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]<cake-php%[email protected]>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
