Hi,

I try it, works fine for XML and RSS !

I would like to add a json extention ...
I add a json folder in my views/[model] and a default.ctp layouts in
layouts/json folder.
I even make an empty JsonHelper class.

Bu when I call http://localhost/cake_1_2/portfolios.json
it return me the same HTML page as http://localhost/cake_1_2/portfolios
?

Any idea ?

Thanks

Constant

On 18 avr, 14:49, "R. Rajesh Jeba Anbiah"
<[EMAIL PROTECTED]> wrote:
> On Apr 14, 3:52 pm, "davyke" <[EMAIL PROTECTED]> wrote:
>
> > i've just download 'cake_1.2.0.4798alpha', i've got this error:
>
> > Deprecated: webservices routes are deprecated and will not be
> > supported in future versions.  Use Router::parseExtensions() instead.
>
> > someone can explain how to useparseExtensionsinstead webservices.
>
> 1.  foo/config/routes.php
>
>         Router::parseExtensions();
>
> 2.  foo/controllers/blogs_controller.php
>
>         var $components = array('RequestHandler');
>
> 3.  foo/views/blogs/rss/view.ctp <-- note: the folder (rss)
>
>  <?php if(!empty($blog['Blog'])):?>
> <?php foreach($blog['Blog'] as $blog):?>
>
> <?php echo $rss->item(array(),
>         array('title'   => $blog['title'],
>                 'link'  => '/blogs/view/'.$blog['id'],
>                 'description'   => $blog['desc'],
>                 'pubDate'               => $blog['created'],
>            )
>         );
> ?>
> <?php endforeach; ?>
> <?php endif; ?>
>
> 4.  http://foo.com/blogs/view/1.rss <-- Note: extension
>
> --
>   <?php echo 'Just another PHP saint'; ?>
> Email: rrjanbiah-at-Y!com    Blog:http://rajeshanbiah.blogspot.com/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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