Reputation: 4063
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?
Upvotes: 1
Views: 602
Reputation: 4063
The solution seems to be to add the subfolder to the namespace:
namespace Application\Controller\SinglePage;
Becomes:
namespace Application\Controller\SinglePage\Leden;
Upvotes: 1