setting up a controller for a page type (5.6)
Permalink
Hi, I'm trying to setup a controller for a 'page type'. I have tried to follow the instruction here:
http://documentation.concrete5.org/developers/working-with-pages/co...
but it will not work... My page type is 'event_page' and the code I have put in at the top of the controller is:
I have saved the controller as event_page.php in /application/controllers/page_types/ as per the instruction
If you can help me out here, I'd be very grateful as it'sdriving me crazy
Thanks
Rob
http://documentation.concrete5.org/developers/working-with-pages/co...
but it will not work... My page type is 'event_page' and the code I have put in at the top of the controller is:
<?php namespace Application\Controller\PageType; use Concrete\Core\Page\Controller\PageTypeController; class EventPage extends PageTypeController {
I have saved the controller as event_page.php in /application/controllers/page_types/ as per the instruction
If you can help me out here, I'd be very grateful as it'sdriving me crazy
Thanks
Rob
Thank you. I can't believe I didn't clock that! Must be tired!
So my controller should start:
and it should be saved as /controllers/page_types/events_page.php ?
I must be doing something wrong as it's still not having it :(
So my controller should start:
<?php class EventsPageTypeController extends Controller{
and it should be saved as /controllers/page_types/events_page.php ?
I must be doing something wrong as it's still not having it :(
Warning: Invalid argument supplied for foreach() in /concrete/core/helpers/form.php on line 341
In this example
controllers/page_types/events.php
Thanks mate, got it sorted now :)
For 5.6 you must follow legacy docs.