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:

<?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

rc255
View Replies:
Parasek replied on at Permalink Reply
Parasek
It is documentation for current (5.7) version of concrete.
For 5.6 you must follow legacy docs.
http://legacy-documentation.concrete5.org/tutorials/basic-mvc-in-concrete5
rc255 replied on at Permalink Reply
rc255
Thank you. I can't believe I didn't clock that! Must be tired!

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
Parasek replied on at Permalink Reply
Parasek
In this example
controllers/page_types/events.php
rc255 replied on at Permalink Reply
rc255
Thanks mate, got it sorted now :)