Oh no... I got that. I need to prefix the name of setting with 'app_'. Ok now it works fine.
Sorry for bothering. :) Thanks and Regards Vikram On Feb 18, 2:24 pm, SeeVik <vikramvmalhotra1...@gmail.com> wrote: > Hello Gareth, > > I tried to fetch the a settings made in app.yml from inside the model, > but it fetches nothing. However it is displaying the value correctly > when used in a template. > > Contents of app.yml > ---------------------------------------------- > #default: > all: > some_literal: hello > > Contents of model > ---------------------------- > $q = Doctrine_Query::create() > -> from( 'table1 t1' ) > -> where( 'name = ?', sfConfig::get( 'some_literal' ); > > return $q->execute(); > > Thanks and Regards > Vikram > > On Feb 17, 5:44 pm, Gareth McCumskey <gmccums...@gmail.com> wrote: > > > You can use that exact same code in the model: > > > sfConfig::get( 'app_max_jobs_per_page' ) > > > Hope that helps > > > Gareth --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---