1

So I have created a single page as subpage at: /application/single_pages/leden/mijnaccount.php

Added it at the single pages list in dashboard. The page is working fine.

But when I add a controller at: /application/controllers/single_page/leden/mijnaccount.php

With the following contents to test:

<?php

namespace Application\Controller\SinglePage;
use Concrete\Core\Page\Controller\PageController;

class Mijnaccount extends PageController
{
    public function on_start()
    {
        exit('Started');
    }

    public function view()
    {
        exit('View');
    }

    public function on_before_render()
    {
        exit('Before render');
    }
}

None of those exit() functions get called. What am I doing wrong?

Shubhamoy
  • 3,718
  • 2
  • 19
  • 24
seymar
  • 3,993
  • 6
  • 25
  • 30

1 Answers1

1

The solution seems to be to add the subfolder to the namespace:

namespace Application\Controller\SinglePage;

Becomes:

namespace Application\Controller\SinglePage\Leden;
seymar
  • 3,993
  • 6
  • 25
  • 30