typo3 - Bootstrapping an extension with Typoscript and calling a specific action -
typo3 - Bootstrapping an extension with Typoscript and calling a specific action -
i have build extension bootstrapping typoscript , placing in modal box. have same extension included in page element different action.
the problem when calling other actions extension in page reflects displayed in bootstrapped version in modal box. want no matter arguments in url (which tell extension action execute) 1 in modal box always phone call same action first.
is possible?
should different solution problem?
the easiest way in sentiment abstractcontoller
2 different controller inherit.
this way separated share same actions:
namespace your\extension\controller; abstract class abstractcontroller extends \typo3\cms\extbase\mvc\controller\actioncontroller{ public function firstaction(){ // code here } public function secondaction(){ // code here } }
first controller:
namespace your\extension\controller; class firstcontroller extends abstractcontroller{ //no need add together actions here }
second controller:
namespace your\extension\controller; class secondcontroller extends abstractcontroller{ //no need add together actions here }
your typoscript included on page phone call firstcontroller->firstaction
, 1 in modal phone call secondcontroller->firstaction
. if transfer different action via get, impact either first or sec controller.
don't forget:
register controller/actions in ext_localconf.php copy / move templates accordingly (they need in folders named after controller, e.g. templates/first/) typo3 typoscript extbase typo3-6.2.x
Comments
Post a Comment