a ha! thanks sam.  I was calling the settings function in before
render, which i guess is too late.  i moved it to before filter and
the vars are available.  brill.

Thanks!

Will.

On Jun 16, 4:16 pm, Sam <s...@masterscommission360.com> wrote:
> Variables stored via Configure::write should be accessable anywhere in
> your site- if it isn't working then the code isn't being executed.
> Figure out why it isn't executing and you'll solve your problem.
>
> Does your plugin AppController extend your site's AppController? Also,
> where are you defining the settings? If you are doing it in the
> AppController beforeFilter, and are using beforeFilter in your plugin
> AppController, make sure that you are calling parent::beforeFilter()
> in your plugin's AppController.
>
> regards,
> Sam
>
> On Jun 15, 6:09 pm, "#2Will" <willjbar...@gmail.com> wrote:
>
> > Hi,  I have some settings set in the admin area and stored in the db
> > that i use throughout the app, and would like to access in a plugin.
>
> > I get the settings like this in the app controller:
>
> > function _getSettings(){
> >                 $this->settings = $this->Setting->find();  #get them
>
> >                 #make available in controllers
> >                 $this->settings = $this->settings['Setting'];
>
> >                 # make available in views
> >                 $this->set('settings',$this->settings);
>
> >                 #make available in plugins
> >                 // ??
>
> >         }
>
> > But those variables are not availabe in a plugin model.  How can I
> > make those settings available everywhere?
>
> > Settings writen using configure::write in the core.php file are
> > available, but not ones written in appController.  Where can i write
> > them out from the DB so they are available in the plugin model?
>
> > Or am i going about this the wrong way entirely?
>
> > Thanks,
>
> > Will.
>
>

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

Reply via email to