Tuesday, August 2, 2011

Re: plugin routing problem

I have not found myself on that situation, but my guess is that by default the controller name takes preference over the plugin name when the router is parsing the URL (in other words: you cannot have a plugin with the same name as a controller). I'm not sure if you could fix that by defining a connected route in the routes.php file.

Cheers,
- Johan

On Tue, Aug 2, 2011 at 3:54 PM, john lyles <confidential99@gmail.com> wrote:
I'm building a blog plugin for CakePHP. It is called 'blog'.

I am following the manual on plugin routing but my links won't work.
http://book.cakephp.org/view/951/Plugin-routing

For example, when I am on this page: appname/blog/posts/index, I have
a link to the index action of the users plugin. So I built my link as
follows:

echo $this->Html->link(
   __('List Users', true),
   array(
       'plugin' => 'users',
       'controller' => 'users',
       'action' => 'index'
   )
);
But the link keep pointing to app/blog/users/index instead of app/
users/users/index. Why is that?

PS: users is also a plugin (from CakeDC).

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


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

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
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

No comments: