Single page controller location
Permalink
Hi all
I'm created a single page and I'd like to use its controller to add some extra javascript to the header. Simple enough.
The single page is located at single_pages/news-and-diary/calendar.php, and the controller is located at /controllers/news-and-diary/calendar/controller.php.
The controller looks like this just now:
...but it never fires. The Calendar single page is successfully added to the CMS, and I can browse to it, but no dice on the controller.
I've tried putting the single page at /single_pages/news-and-diary/calendar/view.php, and I've changed the view() function to on_page_view() and on_start() but to no avail.
No doubt it's something stupid but I'm tearing my hair out trying to work out what it is.
I'm created a single page and I'd like to use its controller to add some extra javascript to the header. Simple enough.
The single page is located at single_pages/news-and-diary/calendar.php, and the controller is located at /controllers/news-and-diary/calendar/controller.php.
The controller looks like this just now:
...but it never fires. The Calendar single page is successfully added to the CMS, and I can browse to it, but no dice on the controller.
I've tried putting the single page at /single_pages/news-and-diary/calendar/view.php, and I've changed the view() function to on_page_view() and on_start() but to no avail.
No doubt it's something stupid but I'm tearing my hair out trying to work out what it is.
So
should have been