On Jan 13, 2011, at 08:11, Matthias wrote:
> I am working on a conference management tool and want it to be able to
> manage multiple conferences. The URLs should look like this:
> http://mydomain.com/abc_conf_2011/workshops/index
> When this URL is called, I want the router to extract the first
> parameter (abc_conf_2011) and hand it over to the Session (or any
> other component where it makes sense). The next parameters should work
> as usual, which means controller/action/parameters. In the book I
> found this:
> Router::connect("/{$prefix}/:controller/:action/*", ...)
> which looks like a start, but how do I process the prefix in my
> intended way?
Prefix routing is for setting up static prefixes -- like an admin section that
is always at /admin.
Don't you just want...
Router::connect('/:conference/:controller/:action/*', ...)
...and then access the conference in your controller as desired?
> The goal is to store the conference name (in the Session) and to
> modify each call to the database and to always add a condition like
> 'conference_name' => $this->Session->conference_name, so that in the
> above example only those workshops are fetched, where the conference
> name matches.
This I'm not sure how to do but I'm sure someone else here does.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" 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