Re: How could controller inform about layout or view existing?

2010-07-23 Thread saidbakr
You are right! the layout that I talked about is found in a theme not in the master theme ( app/view/layouts ) so as a solution I may add it to the master theme and then I need not to add it to other themes because Cake will search for it in the master theme if it is not found in the current theme.

Re: How could controller inform about layout or view existing?

2010-07-22 Thread Zaky Katalan-Ezra
If you set the theme in the app_controller you know the path to the theme folder when you can query for a file. BUT, I think the simple way to do it is to put an empty file in the name flash.ctp in the relevant theme folders Check out the new CakePHP Questions site http://cakeqs.org and help othe

Re: How could controller inform about layout or view existing?

2010-07-22 Thread red
According to the documentation: http://book.cakephp.org/view/1093/Themes "If a view file can't be found in the theme, CakePHP will try to locate the view file in the /app/views/ folder. This way, you can create master view files and simply override them on a case-by-case basis within your theme fo

Re: How could controller inform about layout or view existing?

2010-07-22 Thread saidbakr
Could I understand that there is no any way by which the controller able to investigate about the existence of a layout or view in the theme? On Jul 22, 5:57 am, "Dr. Loboto" wrote: > Just create flsah for every theme and keep default markup for those > you do not need special. > > On Jul 22, 5:1

Re: How could controller inform about layout or view existing?

2010-07-21 Thread Dr. Loboto
Just create flsah for every theme and keep default markup for those you do not need special. On Jul 22, 5:19 am, saidbakr wrote: > Hi, > > I use themes in my application, so there is multiple layouts and views > for each controller could be handled. For one of the themes used, I > created a layou

How could controller inform about layout or view existing?

2010-07-21 Thread saidbakr
Hi, I use themes in my application, so there is multiple layouts and views for each controller could be handled. For one of the themes used, I created a layout called "flash" which is dedicated for displaying flash messages, so in the controller I used the following line of code: $this->Session->s