Dashboard Single Page Controller
Permalinkdirectory/single_pages/dashboard/directory/view.php (here the view is rendered. works)
directory/controllers/single_page/dashboard/directory/controller.php
This is the code for the controller:
<?php defined('C5_EXECUTE') or die("Access Denied."); namespace Concrete\Package\Directory\Controller\SinglePage\Dashboard; use \Concrete\Core\Page\Controller\DashboardPageController; class Directory extends DashboardPageController { public function view() { $this->set('success', 'My success message'); } }
I should be able to echo $success in view.php. But it does not echo anything.
Where is my error?
Cheers
I believe your controller path should look like this:
directory/controllers/single_page/dashboard/directory.php
Your controller.php should be renamed to directory.php.