just a quick correction:
This
----------------------------------------------------------------
Router::connect('/', array('controller' => 'home', 'action' =>
'index', 'admin' => '1'));
----------------------------------------------------------------
does not work for me.
I chnged 'admin' => '1' to 'admin' => 1 and it worked.
On 7 Νοέ, 23:09, cakeFreak <[EMAIL PROTECTED]> wrote:
> I found the solution yesterday with regard toadminrouting:
>
> You need to pass a parameter: 'admin'='1'
>
> EXAMPLE (config/routes.php):
> ----------------------------------------------------------------
> Router::connect('/', array('controller' => 'home', 'action' =>
> 'index', 'admin' => '1'));
> ----------------------------------------------------------------
>
> + I found this usefull in the
> Bakery:http://bakery.cakephp.org/articles/view/custom-urls-from-the-site-root
>
> Hope this helps!
>
> Daniel
>
> On 7 Nov, 19:20, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > I've been fighting with this today as well. I have arouteset up:
> > Router::connect('/admin', array('controller' => 'pages', 'action'
> > =>'index', 'prefix' => Configure::Read('Routing.admin')));
>
> > Which gets me to theadminmain page. However $html->link() doesn't
> > recognize that you're currently in anadminroute.
>
> > With the recent changes away from CAKE_ADMIN to using Configure::*
> > what's the way to force anadminroutebased on the value of
> > Routing.adminin a $html->link() call? (i.e. if a user is logged in
> > andadmin, I might wantadminlinks to show up on standard pages, but
> > I don't want to hard code /adminfor flexibility).
>
> > On Oct 29, 8:22 pm, cakeFreak <[EMAIL PROTECTED]> wrote:
>
> > > Right guys,
> > > what I' trying to achieve is a kindaadmin/home page, that holds my
> > > Routing.admin.
> > > I set my Routing.adminas *admin*
>
> > > ------------------------------------------------------------------
> > > Configure::write('Routing.admin', 'admin');
> > > ------------------------------------------------------------------
>
> > > I tryed 2 strategies:
> > > 1) build an admin_controller.php with a admin_index() and index()
> > > methods
>
> > > 2) create an action in the pages_controller.php called lets sayadmin()
> > > and than use the Router like
> > > ------------------------------------------------------------------
> > > Router::connect('/admin', array('controller' => 'pages', 'action' =>
> > > 'display', 'admin'));
> > > ------------------------------------------------------------------
>
> > > Approach #1 didn't work out.
> > > Approach #2 worked out, but it does not keep the admin_routing in
> > > myadminmenu. Namely if in myadminmenu I have a link to *posts*, when
> > > I go towww.mysite.com/adminmylinkchanges
>
> > > from->www.mysite.com/admin/posts
> > > to->www.mysite.com/posts
>
> > > How can I reroute my MAINadminpage without loosing the authomagic of
> > > myADMIN.ROUTED menu links?
>
> > > Cheers in advance for your replays!
>
> > > Dan
>
> > > PS: I also tryed
> > > ------------------------------------------------------------------
> > > Router::connect('/admin', array('controller' => 'pages', 'action' =>
> > > 'display', 'admin_index'));
> > > -----------------------------------------------------------------
>
> > > but it didn't work.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---