I haven't tried this, but you should be able to do the following in /app/config/routes.php:
$Route->connect('/', array('controller' => 'pages', 'action' => 'display', 'basepage'));
$Route->connect('/:everythingAfterSlash', array('controller' => 'pages', 'action' => 'display', 'basepage'));
Then you can access the data with $this->params['everythingAfterSlash'].
It might work!! :-)
Eric
On 10/2/06, WeeJames <[EMAIL PROTECTED]> wrote:
Hi there,
What im looking to do is redirect all pages requests
( http://example.com/pages/home http://example.com/pages/contactus etc.)
to a single view. From this view i then intend to dynamically
determine the html content based on the action and other parameters.
I cant figure out how to get CakePHP to always use this basic template
(e.g. basepage.thtml) when displaying a page. Ive tried editing the
pages_controller.php display function to specify a template to avail by
editing the arguments of the render function.
$this->render(join('/', $path), null, 'basepage.thtml');
Anyone have any ideas?
Cheers
James
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
- Redirect All Papges To A Single View WeeJames
- Re: Redirect All Papges To A Single View Eric C Blount
