Sub-page single page controller isn't loaded (5.6.3.3)
Permalink
Hi all,
This has been raised before but I haven't found a satisfactory answer.
If I create a single page that isn't an immediate child of the homepage, I can't load its controller. I've checked naming conventions and typos but nothing works:
The output is:
Any thoughts?
This has been raised before but I haven't found a satisfactory answer.
If I create a single page that isn't an immediate child of the homepage, I can't load its controller. I've checked naming conventions and typos but nothing works:
/single_pages/subpage/test.php /controllers/subpage/test.php /single_pages/subpage/test/view.php // Alternative structure /controllers/subpage/test/controller.php // Controller code class testController extends Controller { public function test() { return "hello"; } } // View code $test = $this->controller->test(); echo $test;
The output is:
Fatal error: Call to undefined method Controller::test() in /var/www/html/single_pages/test.php
Any thoughts?
/controllers/single_page/subpage/test.php
And your Single Page in
/single_pages/subpage/test.php
Then you will need to make sure that the controller starts with