| |
CakePHP |
/blog/:spam/* then if the browser requested /blog/eggs/ then $this->params['spam'] would contain the value 'eggs'. You can have /blog/:year/:month/:day/:slug/* gets you something like the default WordPress blog link structure. /blog/:action/:spam when called with: /blog/view/eggs/ will call the "view" action with $this->params['spam'] set to "eggs". Best wishes, --
> using apache mod rewrite to pass the rest of the path to cake and the
> second one by "Routes" to further route the URL in cake internally. Is
> this correct?
> controllers, functions and parameters.
> blog/:action/* ). What is the special meaning of the colon? It isn't
> mentioned anywhere.
I think the syntax is a Ruby-ism. First, the general case. If your
route is:
more than one in the route. For example:
There are two 'magic' parameters, "controller" and "action" which, when
set, decide which controller or action to call respectively. For
example, the route:
> The manual doesn't mention it.
> cake only use the /controller/action/param/param... convention?
advice is to construct a controller action to display $this->params and
see how they are handled.
help you solve the problem yourself. Note that the CakePHP source is
very readable for a PHP program, so examining the dispatcher code may
make sense than any of this.
Chris Lamb, Leamington Spa, UK GPG: 0x634F9A20
|
|
signature.asc < 1K Download |