Is there any nice way to access variables defined in controller.php (core file) from within controller.post.php in addon without modifying the cores??
Is there any nice way to access variables defined in controller.php (core file) from within controller.post.php in addon without modifying the cores??
Sure:
$data = Registry::get('view')->getTemplatelVars('variable name'); // modify $data Registry::get('view')->assign('variable name', $data);
There is a typo in the code. It should be
$data = Registry::get('view')->getTemplateVars('variable name'); // modify $data Registry::get('view')->assign('variable name', $data);
And do not forget to add this line of code to the top of the file
use Tygh\Registry;
thx