I have created the zend framework structure like the following
application
- configs
- controllers
- models
- modules
- admin
- controllers
- models
- views
...
- user
- controllers
- models
- views
...
- account
- controllers
- models
- views
...
- profile
- controllers
- models
- views
...
- views
.....
I'm creating an application which have two different user roles as "user" and "admin". Both user and the admin should access the modules profile and only the admin have the access to the accounts module. Currently I'm facing an issue as follows
When i login as admin i get the following url in the address bar and i'm getting the admin menus and design (layout) perfectly as i expected localhost/public/admin/index
But when I click the edit profile link in the page, I lost the admin layout and the browser redirected to localhost/public/profile/edit URL. The same problem with the user module also.
What i exactly need is when i click the edit profile link, i should be able to access the page with the same layout(admin layout for admin) and the url should be something like http://localhost/public/admin/profile/edit
Is it possible to do with zend framework when i have the modules as i have given above? because I need to keep the system in a module basis and i dont want to redo the same code again and again. I checked in zend forums and i was unable to find the correct answer for what i'm asking.
Can Anyone kindly help me to solve this issue. Thanks in advance. Kind regards,