Page Controllers
Permalink
I'm trying to set up some page controllers for the first time in 5.7, I made /applications/single_pages/test_page.php and added it through the dashboard, and that worked as expected.
Next I made the controller, applications/controllers/single_page/test_page.php
I also tried making a controller for the "Full" page type in applications/controllers/page_types/full.php
neither is working when the pages are loaded. Maybe a namespacing issue? If someone can point me in the right direction it would be appreciated. -thanks
Next I made the controller, applications/controllers/single_page/test_page.php
<?php namespace Application\Controller\SinglePage; use PageController; class TestPage extends PageController { public function view() { $this->set('test', 'test'); } }
I also tried making a controller for the "Full" page type in applications/controllers/page_types/full.php
<?php namespace Application\Controller\PageTypes; use \Concrete\Core\Page\Controller\PageController; class Full extends PageController { public function view() { $this->set('test', 'test'); } }
neither is working when the pages are loaded. Maybe a namespacing issue? If someone can point me in the right direction it would be appreciated. -thanks
No, that didn't work either...
I got the single controller working after I restarted the browse, maybe it was a cache thing. But the page controller for Full page type I still do not get working. If anyone can help with that it would be great. thanks
namespace Application\Controller\PageType
and use PageTypeController?