Can't access controller functions from view.php in remote site.
Permalink
I was working on my first block. In my view.php. I had a code to access functions in the controller like this:
This is working while I was testing it on my localhost but this did not work in the live site. On the live site, I had to use view() function in the controller to create variables and use them in view.php.
It's probably a bad practice to call the controller functions from view.php directly but I was wondering why this worked on my localhost and not on the live site.
$controller->myfunc();
This is working while I was testing it on my localhost but this did not work in the live site. On the live site, I had to use view() function in the controller to create variables and use them in view.php.
It's probably a bad practice to call the controller functions from view.php directly but I was wondering why this worked on my localhost and not on the live site.
Hope this helps.
Job.