Apart from what Matthew already said, to answer the general question:
Yes. You can have the following in your admin module config:
return array(
'router' = array(
'routes' = array(
'admin' = array(
'type' = 'literal',
'options' = array('route' = '/admin'),
'may_terminate' = true, // if you want to allow this
)
),
)
);
and then in your other modules:
return array(
'router' = array(
'routes' = array(
'admin' = array(
'child_routes' = array(
// …
)
)
),
)
);
Those configs will eventually be merged by the module manager.
On 18.07.2013 22:21, Tomasz Kuter wrote:
Hi all,
I am working on own CMS system in Zend Framework 2.
It means I will have frontend and backend site.
I would like to have backend at following url:
/admin
In administration panel there will be a few sections at the beginning e.g.
webpages, news, media.
These sections will be available as follow:
/admin/webpages
/admin/news
/admin/media
Each section has many actions e.g. add, edit, delete.
I would like to have following modules:
1. admin (general functionality)
2. website (webpages management)
a) index controller (frontend)
b) admin controller (backend)
3. news (news management)
a) index controller (frontend)
b) admin controller (backend)
4. etc
Currently I have all admin routes in file
/module/Admin/config/module.config.php
Is there a possibility to keep main /admin route in mentioned file,
and sections route (e.g. /admin/webpages) in separate modules?
Thanks.
--
Regards,
Tom Kuter
--
Ben Scholzen 'DASPRiD'
Community Review Team Member | m...@dasprids.de
Zend Framework | http://www.dasprids.de
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com