thanks i will try it. 2010/6/19 cricket <[email protected]>
> On Jun 18, 4:30 pm, Davor Ilic <[email protected]> wrote: > > Hi cakers, > > > > how i can use themes global or to set it in DB (MySQL) and use it without > to > > set it in every Controller i try to set in AppController but this doesn´t > > work. > > Is there a possibility to use it global? > > bootstrap.php: > > Configure::write('theme', 'default_theme_name'); > > The theme name will now be available everywhere with > Configure::read('theme'). > > You could also do this in AppController: > > var $theme; > > function beforeFilter() > { > $this->theme = Configure::read('theme'); > } > > > > class AddsController extends AppController { > > var $name = 'Adds'; > > var $view = 'Theme'; > > var $theme = 'myTheme'; > > > > } > > > > Just out of curiosity, do you have a model named Add? What is it for? > Adding themes? If so, wouldn't it be better to create a Theme model? > > 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
