I recommend taking a look at parse extensions
This will take care of exactly what you want it to do without any extra 
controller logic
http://book.cakephp.org/2.0/en/development/rest.html

On Thursday, September 13, 2012 8:31:38 PM UTC-7, Lightee wrote:
>
> Dear Cakephp gurus,
>
> I am creating some web services using cakephp with XML. When user visit a 
> URL, cakephp is smart enough to detect the URL extension and direct to the 
> correct view folder. For example, if URL ends with .xml, view is directed 
> to the xml folder. My problem comes with the controller. If there any way 
> for controller to know whether URL ends with .xml? Currently, I have to 
> create new actions for add, edit, delete and view just to handle .xml URLs.
>
> THank you.
>

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to