I'm writing a Poll plugin and have configured the following routes:

Router::connect(
        '/polls/vote',
        array(
                'plugin' => 'poll',
                'controller' => 'polls',
                'action' =>'vote'
        )
);
Router::connect(
        '/admin/polls',
        array(
                'plugin' => 'poll',
                'admin' => 1,
                'controller' => 'polls',
                'action' => 'index'
        )
);

The first works just fine. However, when trying the 2nd while not yet
logged in, I found myself being redirected to /"poll/users/login",
which failed, of course. I thought it was just an Auth thing, so I
created a beforeFilter() in PollAppController, where I re-declared
$loginAction, $loginRedirect, etc. but with 'plugin' => null in each
route array. That fixed the problem with login redirection but I've
since noticed that ALL of my routes have '/poll' prepended when a view
from my plugin is displayed. I mean, all links for the rest of the
site. Everything.

So, do I have to add 'plugin' => null to every route and every
$this->Html->link() call? Please tell me "no" and that it'll all be
ok.

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

Reply via email to