Re: Xml layout name

2007-12-05 Thread sum1kul

Try this as well:
option 1:
- turn on Router::parseExtensions(); in routes.php
- use xml extension for url, then the defaut.ctp in xml folder will be
used by cake.
 - more info
http://groups.google.com/group/cake-php/msg/3baf7b8e7256aae1

option 2:
the default.ctp only outputs xml declaration
header()); ?>
so if you can output the same from view, you dont need the xml layout.
(but remember to set $this->layout=false)

On Dec 5, 2:05 pm, jarmstrong <[EMAIL PROTECTED]> wrote:
> I believe that is so you can have the same layout name with different actual
> layouts.
>
> For instance layout='newsfeed' or 'productlist', you might want a Html, Rss,
> and XML output.
>
> Andreas-70 wrote:
>
> > I used this one and it works.
>
> > $this->layoutPath = 'xml';
> > $this->layout = 'default';
>
> > I'm wondering though why have they even bothered putting them into a
> > folder in the first place?
>
> --
> View this message in 
> context:http://www.nabble.com/Xml-layout-name-tf4938385.html#a14181184
> Sent from the CakePHP mailing list archive at Nabble.com.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Xml layout name

2007-12-05 Thread jarmstrong


I believe that is so you can have the same layout name with different actual
layouts.

For instance layout='newsfeed' or 'productlist', you might want a Html, Rss,
and XML output.


Andreas-70 wrote:
> 
> 
> I used this one and it works.
> 
> $this->layoutPath = 'xml';
> $this->layout = 'default';
> 
> I'm wondering though why have they even bothered putting them into a
> folder in the first place?
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Xml-layout-name-tf4938385.html#a14181184
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Xml layout name

2007-12-04 Thread Andreas

I used this one and it works.

$this->layoutPath = 'xml';
$this->layout = 'default';

I'm wondering though why have they even bothered putting them into a
folder in the first place?

Thanks for the help!

On Dec 4, 2:10 am, snowdog <[EMAIL PROTECTED]> wrote:
> Or you can set Router::parseExtensions('xml'), then you dont have to
> specify layout, cake will take care of it
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Xml layout name

2007-12-03 Thread snowdog

Or you can set Router::parseExtensions('xml'), then you dont have to
specify layout, cake will take care of it
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Xml layout name

2007-12-03 Thread Grant Cox

Or actually, try:
$this->layoutPath = 'xml';
$this->layout = 'default';

obviously that second line is optional - as 'default' is what should
be used anyway.


On Dec 4, 7:48 am, Grant Cox <[EMAIL PROTECTED]> wrote:
> I expect it will work with
> $this->layout = 'xml'.DS.'default';
>
> On Dec 4, 4:15 am, Andreas <[EMAIL PROTECTED]> wrote:
>
> > Hi
>
> > I've been trying to use the xml layout but it's not going too well
> > since the layout file itself is located within a subfolder called xml
> > (xml/default.ctp) and I'm not sure how to reach it with $this->layout
> > = '';?
>
> > Andreas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Xml layout name

2007-12-03 Thread Grant Cox

I expect it will work with
$this->layout = 'xml'.DS.'default';

On Dec 4, 4:15 am, Andreas <[EMAIL PROTECTED]> wrote:
> Hi
>
> I've been trying to use the xml layout but it's not going too well
> since the layout file itself is located within a subfolder called xml
> (xml/default.ctp) and I'm not sure how to reach it with $this->layout
> = '';?
>
> Andreas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Xml layout name

2007-12-03 Thread Andreas

Hi

I've been trying to use the xml layout but it's not going too well
since the layout file itself is located within a subfolder called xml
(xml/default.ctp) and I'm not sure how to reach it with $this->layout
= '';?

Andreas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---