everybody!
setRouteVariables()
doesn't appear to be working for me. If I boil my controller function down to just this:
public function actionSubmitForm() {
craft()->urlManager->setRouteVariables([
'foo' => 'bar'
]);
}
and my <form method="post" action="" accept-charset="UTF-8">
contains the following (among other inputs):
<input type="hidden" name="action" value="directoryForms/submitForm">
it hits the correct endpoint and then reloads the appropriate template, but it doesn't give me access to the {{ foo }}
variable in that template. It just tells me Variable "foo" does not exist
. I know it's hitting the right controller endpoint because if I die()
there it dies as expected.
Any thoughts? I've really boiled this one down as far as I can. I must be missing something obvious. Thanks!