Just modify your routes to specify the admin route before the 
catchall:

$Route->connect('/admin/*', array('controller' => 'admin', 'action' 
=>'index'));
$Route->connect('/*', array('controller' => 'contents', 'action' 
=>'index'));


On Jan 28, 1:40 am, "GuyBowden" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a current site that the content and parts of the layout are
> controlled by a database table.
>
> As such I only really need one action inside one controller to run the
> site - the parameters that get passed in the url define which content
> to display...
>
> i.e.
> mysite.com/mainpage/subpage
>
> calls my controller 'contents' with the action 'index' and the
> mainpage + subpage params passed to index which gets the content
> accordingly...
>
> I've set up the routing like this:
> $Route->connect('/*', array('controller' => 'contents', 'action' =>
> 'index'));
>
> This is a basic catch all statement - which for this purpose works
> absolutely fine.
>
> However, I need to add an admin module to the site - so that
> "mysite.com/admin/contents" will call the " "admin_index" action in
> the contents controller.
>
> How can I change my current catch all routing so that it doesn't catch
> 'admin' ?
>
> I can obviously write my own routing code in my index action, but
> thought there would probably be a better way built in to save doing
> this.
>
> Cheers,
>
> Guy


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to