Hi Sam

No I don't try to get mysite.com/admin for specific controller's
action. I try to get mysite.com/admin as an independent page to act as
a home page or a dashboard for the rest of admin routes. In other
word, I try to make this page to have some links to some admin actions
of controllers beside some administrative data, such as, unapproved
comments, number of registered users and so on.

Regards.

On Jun 12, 3:33 pm, Sam Sherlock <[email protected]> wrote:
> Hi Saidbakr
>
> I think some meaning is lost in translation
>
> are you trying to have mysite.com/admin display a specific admin controller
> / action?
>
> if so I use the following to display a user dashboard
>
> Router::connect('/admin', array('prefix' => 'admin', 'controller' =>
> 'users', 'action' => 'dashboard'));
>
> this means that the following are the same
> mysite.com/admin
> mysite.com/admin/users/dashboard
>
> - S
>
> On 12 June 2010 12:44, saidbakr <[email protected]> wrote:
>
>
>
>
>
> > The situation is different. Indeed there is no really mysite/admin/
> > the admin here is an action from pages controller. But there is admin
> > routs such as mysite/admin/users/add. What I need to achieve is to set
> > or make an index page for admin and when the user is being on mysite/
> > admin/users/add and has a redirect to be directed to a controller
> > without admin prefix as regarded before.
>
> > In more clearance, the problem is:
> > When the user becomes on some place like mysite/admin/posts and got a
> > redirect code, the action portion auto prefixed with admin.
>
> > The redirect code logic I uses is a method of AppController and it
> > called from beforeFilter function in AppController too.
>
> > On Jun 12, 3:50 am, Kurt Polinar <[email protected]> wrote:
> > > You can use either:  redirect('controller'=>'pages', 'action'=>'display',
> > > 'admin'=> true) or redirect('controller'=>'pages', 'action'=>'display',
> > > 'prefix'=>'admin')
>
> > > use 'prefix'=>'admin' or 'admin'=>true to redirect to admin pages.
>
> > > On Sat, Jun 12, 2010 at 5:06 AM, saidbakr <[email protected]> wrote:
> > > > In other word,
>
> > > > What does make something like  redirect('controller'=>'pages',
> > > > 'action'=>'display') perform redirection to missing action
> > > > "admin_display"?
>
> > > > On Jun 12, 12:03 am, saidbakr <[email protected]> wrote:
> > > > > Hi,
> > > > > Admin actions "admin_actionname()" works fine something like this:
>
> > > > >http://thesite.com/admin/contros/actionname
>
> > > > > What I need is to set another page to work as admin home to be
> > > > >  http://thesite.com/admin/
>
> > > > > I manged this from pages controller by setting an action called admin
> > > > > and set route to it, but this solution makes some trouble with
> > > > > redirects from admin actions to another non admin action using
> > > > $this->redirect('controller'=>'contNames', 'action'=>'actionname')
> > because
>
> > > > > it redirect it pages controller but the action is admin_action where
> > > > > it is not found.
>
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> > 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]<cake-php%[email protected]>
> > <cake-php%[email protected]<cake-php%[email protected]>>For
> > more options, visit this group at
> > > >http://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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]<cake-php%[email protected]>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 [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