Sub-page single page controller isn't loaded (

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:

/single_pages/subpage/test/view.php // Alternative structure
// 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?

View Replies:
hutman replied on at Permalink Reply
In order for this to work you need your Single Page Controller in this folder structure


And your Single Page in


Then you will need to make sure that the controller starts with

namespace Concrete\Controller\SinglePage\Subpage;
class Test extends Controller{
melat0nin replied on at Permalink Reply
Sorry I should have mentioned I am running, so I don't think the namespace stuff comes into it!

Thanks for your reply though :)