Dashboard Single Page Controller

I need to develop a dashboard single page in 5.7. I did this in 5.6 a few times, but now I´m struggeling. My folder structure of the package (name is: directory) is:

directory/single_pages/dashboard/directory/view.php (here the view is rendered. works)

This is the code for the controller:

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?

View Replies: View Best Answer
MrKDilkington replied on at Permalink Best Answer Reply
Hi micrdy,

I believe your controller path should look like this:

Your controller.php should be renamed to directory.php.
alinpop replied on at Permalink Reply
Hi guys,

I have the same problem, any solutions?
MrKDilkington replied on at Permalink Reply

Please include specific details about your problem.