It looks for ajax.ctp because it detects the ajax request header in the
request when you make your call for that page :

http://book.cakephp.org/view/174/Request-Handling

*By default RequestHandler will automatically detect Ajax requests based on
the HTTP-X-Requested-With header that many javascript libraries use. When
used in conjunction with Router::parseExtensions() RequestHandler will
automatically switch the layout and view files to those that match the
requested type.*


Glad to help, enjoy your Cake coding :)

On Mon, Oct 5, 2009 at 6:51 PM, bRuNuShky <[email protected]> wrote:

>
> Hi, Bert....
>
> Thanks... !!! .. I was using level 1 in debug... but don't consider
> that up this to 2 will give me any details in this particular case...
> (I missing the point that although it's call through javascript debug
> will show somethign) ...also I foget that I set debug to 0 in the
> controller function... :(
>
> Anyway you recomendation open my eyes... and I found that it was
> looking for "view/layout/xml/ajax.ctp" and not the default view  "view/
> layout/xml/default.ctp" ... This could be because I did the call with
> Javascript? ... so I try with ajax.ctp and everything works fine, but
> I ended adding layout = 'default'  to my controller..and it works
> "view/layout/xml/default.ctp" ...So both ways works fine now, but Im a
> bit curious about why ....
>
> So lesson learned, if something goes wrong... up debug level !!! ;)
>
> Thanks Bert .... I really appreciate your help!!!
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to