Answer the question
In order to leave comments, you need to log in
How to nest controllers more in Kohana 3.3.*?
I use the kohana 3.3.6 framework in the project.
I am making a modular application structure, and the essence is as follows.
In the Personal Account (PC) of managers there is a Catalog section, for which it is responsible Controller_Manager_Catalog
, also inside the catalog there are goods (Items) for which it is responsible Controller_Manager_Catalog_Items
, and there are categories of goods Controller_Manager_Catalog_Categories
.
The folder structure is as follows:
application/classes/Controller/Manager/Catalog.php
application/classes/Controller/Manager/Catalog/Categories.php
application/classes/Controller/Manager/Catalog/Items.php
Route::set('manager', 'manager(/<controller>(/<action>(/<id>)))')
->defaults(array(
'directory' => 'manager',
'controller' => 'catalog',
'action' => 'index',
));
Route::set('manager-catalog', 'manager/catalog(/<controller>(/<action>(/<id>)))')
->defaults(array(
'directory' => 'manager/catalog',
'controller' => 'categories',
'action' => 'index',
));
http://sitename.ru/manager/catalog/categories/index
gives an error 404. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question