Re: 1.3 prefix routing.

2010-05-28 Thread Andy Dirnberger
In your controller, the current prefix is stored in $this-
params['prefix']. It's also available through Router::currentRoute()-
defaults['prefix'].

On May 27, 6:45 pm, aleph1 cubeythero...@gmail.com wrote:
 I can't see how to retrieve the current prefix that is being used for
 routing purposes.

 For example, if I configure Routing.prefixes as follows:

 Configure::write('Routing.prefixes', array('admin','moderator'));

 How do I retrieve the current prefix when a page is viewed?

 In 1.2 this was Configure::read('Routing.admin');, but I can't seem to
 find an equivalent for 1.3.

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


Re: 1.3 prefix routing.

2010-05-28 Thread Jon Bennett
 In your controller, the current prefix is stored in $this-
params['prefix']. It's also available through Router::currentRoute()-
defaults['prefix'].

Cheers - not sure that's relevant though :p

J


 On May 27, 6:45 pm, aleph1 cubeythero...@gmail.com wrote:
 I can't see how to retrieve the current prefix that is being used for
 routing purposes.

 For example, if I configure Routing.prefixes as follows:

 Configure::write('Routing.prefixes', array('admin','moderator'));

 How do I retrieve the current prefix when a page is viewed?

 In 1.2 this was Configure::read('Routing.admin');, but I can't seem to
 find an equivalent for 1.3.

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




-- 
jon bennett - www.jben.net - blog.jben.net

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


Re: 1.3 prefix routing.

2010-05-27 Thread Sam Sherlock
Configure::read('Routing.admin'); in 1.3 =
Configure::read('Routing.prefixes.0');
you can get an array of prefixes for building routes in routes.php
Configure::read('Routing.prefixes');

- S




On 27 May 2010 23:45, aleph1 cubeythero...@gmail.com wrote:

 I can't see how to retrieve the current prefix that is being used for
 routing purposes.

 For example, if I configure Routing.prefixes as follows:

 Configure::write('Routing.prefixes', array('admin','moderator'));

 How do I retrieve the current prefix when a page is viewed?

 In 1.2 this was Configure::read('Routing.admin');, but I can't seem to
 find an equivalent for 1.3.

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