I have a Controller Action which should pass on some data from one (CP) template to another:

  1. Template 1 (plugin/form): Form sends data
  2. Controller redirects data to Template 2
  3. Template 2 (plugin/): Shows data

I don't want to just load the template but redirect to plugin/ and show the data, any ideas?

public function actionTemplate()
    $data = 'Something';
    $this->redirect( 'plugin_handle' ); //Pass on $data to 'plugin/'

Edit 1:

Or is there a way to send a post-request to a "route" rather then an actionController?


I would suggest either using query parameters in your redirect method, or storing it in session variables (which should be no different than regular PHP).

  • Hoped to avoid that, but thanks :) – Victor In Jul 18 '14 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.