Hello, im creating an extension that will need a callback action (using $_GET).
can a controller reside inside the extension folder?
please i need some ideas.
thanks.
Hello, im creating an extension that will need a callback action (using $_GET).
can a controller reside inside the extension folder?
please i need some ideas.
thanks.
it can, but have to point it in config file:
'controllerMap'=>array(
'controllerID'=>array(
'class'=>'path.to.PostController',
'attribute'=>'some value',
),
'otherControllerId'=>'path.to.UserController',,
),
then you can access then as:
index.php?r=controllerID/actionName
or
index.php?r=otherControllerID/actionName
another solution is to create module instead of extension. Module can have own controllers accessed by default (without any need to change configuration) by:
index.php?r=moduleId/controllerId/action
Great,
the first option will not be a good design for something i wish to share
i will go for the second option.
thanks.