hi group
today i have really complex problem when i try to implement a site
with two back end interface one for the superadmin interface which
offered to enter the global site config. and the second one is the
admin interface which offered to admin the site content and i didn't
use core.php using Configure::write('Routing.admin', 'admin') i use
the routes.php with these two lines
Router::connect('/superadmin/:controller/:action/*', array('prefix' =>
'superadmin'));
Router::connect('/admin/:controller/:action/*', array('prefix' =>
'admin'));
and after that i continue to implement the first controller which is
the posts controller and the problem appear when i try to add a link
in the admin_index.ctp view of the posts controller to the action add
of the same controller. the problem is when i use the verbose link the
route system give wrong link like this
[ admin_index.ctp of Posts controller ]
..
<?php e($html->link('+ add new post',array
('controller'=>'Posts','action'=>'admin_add'))) ?>
..
the result link will be
/superadmin/posts/admin_add [ wrong link ]
but when i rearrange the route line to become like this
Router::connect('/admin/:controller/:action/*', array('prefix' =>
'admin'));
Router::connect('/superadmin/:controller/:action/*', array('prefix' =>
'superadmin'));
i get the right link like below
/admin/posts/add
is there any solution to this problem which will i face it again when
i'll work with the superadmin interface
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---