cake-php@googlegroups.com
[Top] [All Lists]

Re: Prefix routing

Subject: Re: Prefix routing
From: Tilen Majerle
Date: Mon, 6 Dec 2010 16:19:29 +0100
yes, u need to define $prefix before call Router::connect :D


something like that:


{{{

$prefix = "admin";

Router::connect("/{$prefix}/:controller/:action/*", array('prefix' =>
$prefix, $prefix => true));


}}}
--
Tilen Majerle


2010/12/6 Jeremy Burns <jeremyburns@xxxxxxxxxxxxxxx>
According to the book (http://book.cakephp.org/view/950/Prefix-
Routing) it appears that this ought to work:

Router::connect("/{$prefix}/:controller/:action/*", array('prefix' =>
$prefix, $prefix => true));

When I use it, however, I get:

Undefined variable: prefix [APP/config/routes.php, line xx]

AmI doing something wrong or making the wrong assumption? ow can I get
this to work?

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 cake-php@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

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 cake-php@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
<Prev in Thread] Current Thread [Next in Thread>