Wednesday, October 1, 2008

Re: CakePHP whith PHP/SWF SlideShow

I am assuming all you really need here is a herper to show up the
flash object (assuming it works this way) and the parseExtensions
automagic of CakePHP 1.2
You can add to routes.php the following:

Router::parseExtensions('xml');

This will tell it to redirect the view to use /app/views/controller/
xml/action.ctp

Note the XML directory that has been added into that path.
You can, from there, assign an XML layout, and output XML data based
on the model data that is assigned to the view, in the controller.

So if it was a blog, and you wanted to provide an XML document showing
current blogs, instead of outputting a nice HTML table, you would
encapsulate the lot in XML tags.
Best way to see this working is to throw it in and have a go.
You can just browse to the normal address, with the 'xml' extension.

http://site.com/controller/action
becomes
http://site.com/controller/action.xml

Simple!
So when it comes time to add a data source to your flash for chart
generation, you just do:
<?php
echo Router::url(array(
'controller' => 'something',
'action' => 'stuff',
'ext' => 'xml')); ?>

Hope this helps.


On Oct 2, 5:00 am, Sackjounas <Sackjou...@gmail.com> wrote:
> Hello Guys
>
> I'm Quite New developing in CakePHP
> and I'm curious about integrating CakePHP and PHP/SWF Slideshow
>
> I've read the PHP/SWF Chart tutorial, but it is difficult to
> understand for me
>
> can you tell me where to find this information to read?
>
> I have CakePHP 1.2 and I want to make PHP/SWF Slideshow to work
>
> thanks a lot
>
> Daniel
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: