Single page dashboard controller

Hello, can someone tell me what I am doing wrong? I want to add a single page to dashboard with controller, but this new page don’t use correct controller. Setup:

try using? i am not sure

no, it didn’t help. The docs says that it should be named in the same way as the single_pages file

Yeah sorry I wasn’t by my computer, I have now had a chance to look at the core and how it is done in the concrete folder and that looks right.

For me it also looks alright but it is not working. Maybe I’m not using controller in proper way in frontend files? How can I use field from controller in frontend? I tried echo $this->controller->text; also tried to call getText method , but no luck in either of this

Your directory structure and namespacing looks correct (this is usually the problem). Was the Controller in place with the correct namespace when you installed the Single Page? Sometimes if the controller wasn’t there to begin with it doesn’t get recognized later. Also, your view() function with the set should be what comes through.

I added single_page in dashboard app, and after this I added controller, so it maybe the case it’s not working… Need to try again. BUT how can I delete this page from dashboard? There is no delete function, removing from file system doesn’t help. Do I need extra privilages?

comes through what? Could you explain more clearly?

If you can’t delete the Distributors Form page then you’ll need to get additional permissions, you should be able to just delete it from where you are.

When you’re using a single page, the view() function is what is automatically called. So in your controller’s view() function you have $this->set, whatever you have as the first variable there should be accessible from the single page using $text