Wednesday, December 31, 2008

Re: what's wrong with my route?

On Wed, Dec 31, 2008 at 2:49 AM, Adam Royle <adam@sleekgeek.com.au> wrote:
>
> I don't usually care about routes for my admin controllers since no
> one except administrators see them, so if it was me I wouldn't worry
> about it.

It's not just the admin routes I'm having problems with. Perhaps that
wasn't the best example. In any case, I've seen several examples where
the path does not conform to Cake's "/controller/action' paradigm and
a route is created to point to the correct controller. My problem is
that this appears to only work some of the time. And I cannot figure
out why it works when it does.

> However you could probably simplify your routes:
>
> Router::connect('/admin/islandnews/:action/*', array('controller' =>
> 'newsletters', 'admin' => true));

I've purposely not made them simple, as that actually makes things
less convenient. I'm fine with spelling out a few extra routes. I need
to be able to use, eg.
/islandnews/2008-10

... among other things. That particular one works in some situations,
other times, not so much.

Basically, my question is, what's up with this reverse routing I keep
reading about? Either it doesn't work as advertised, or I'm doing
something wrong (and I expect it's the latter).

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