This is my situation: I have the same action that can be a normal page or a xml page. For example "/posts/view/1" or "/posts/view/1.xml"
If is a normal page I would set Layout ajax. If is a xml page I would set Layout default. How can I do it? On 13 Mag, 19:54, francky06l <[EMAIL PROTECTED]> wrote: > When using router::ParseExtension(), if the request is .xml the > default xml layout will be used. If you store a view for xml in /views/ > controllers/xml/view.ctp, the view will be picked up to render xml. > Basically cake is taking care of rendering the right view with the > layout if your views have the action name and are stored at right > place > hth > > On May 13, 5:29 pm, "[EMAIL PROTECTED]" > > > > <[EMAIL PROTECTED]> wrote: > > I would use WebService in Cake 1.2. > > I follow the article Chris Hartjes > > >http://www.littlehart.net/atthekeyboard/2007/03/13/how-easy-are-web-s... > > > and all works > > But I have a question about this : > > If I have a xml request I would use a layout If I have a normal > > request I would use another layout. > > How can I know the type of request to decide the layout that I must > > use?- Nascondi testo tra virgolette - > > - Mostra testo tra virgolette - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
