8.5.2 Pass variable from dashboard page controller to view
Permalink
Hi All,
I am trying to add a dashboard page and can't wrap my head around how to setup the controller and view.
This is what i have done.
I created a dashboard page called "opzeggen" in the folder:
/application/single_pages/dashboard/opzeggen.php
The content of opzeggen.php is:
I created a controller for this page in the folder: /application/controllers/single_page/dashboard/opzeggen.php
The content of opzeggen.php is:
When visiting the dashboard page "Opzeggen" the $success variable outputs NULL instead of 'success';
Can anybody explain to me what I am doing wrong?
Thanks....
I am trying to add a dashboard page and can't wrap my head around how to setup the controller and view.
This is what i have done.
I created a dashboard page called "opzeggen" in the folder:
/application/single_pages/dashboard/opzeggen.php
The content of opzeggen.php is:
I created a controller for this page in the folder: /application/controllers/single_page/dashboard/opzeggen.php
The content of opzeggen.php is:
<?php namespace Application\Controller\SinglePage\Dashboard\Opzeggen; use Concrete\Core\Page\Controller\DashboardPageController; class Opzeggen extends DashboardPageController { public function view() { $this->set('success', 'success'); } } ?>
When visiting the dashboard page "Opzeggen" the $success variable outputs NULL instead of 'success';
Can anybody explain to me what I am doing wrong?
Thanks....
namespace Application\Controller\SinglePage\Dashboard;