So I have made a dashboard Single Page under:
/application/single_pages/dashboard/newsletter.php
and a
/application/single_pages/dashboard/view.php
The Controller is under:
/Concrete/controllers/single_pages/dashboard/newsletter.php
The Controller looks like:
<?php
namespace Concrete\Controller\SinglePage\Dashboard;
use Concrete\Core\Multilingual\Page\PageList;
use \Concrete\Core\Page\Controller\DashboardPageController;
class Newsletter extends DashboardPageController {
public function view() {
$testVar = array(
'one' => 'some',
'two' => 'value',
'three' => 'foo',
'four' => 'bar'
);
$this->set('test', $testVar);
}
}
The /application/single_pages/dashboard/newsletter.php
looks like:
<?php defined('C5_EXECUTE') or die("Access Denied.");
echo 'something';
print_r($test);
The /application/single_pages/dashboard/view.php
looks like:
<?php defined('C5_EXECUTE') or die("Access Denied.");
THE PROBLEM:
The local variable $test
doesn't show up in the view.
The echo 'something';
is showing, so basically the page is up and running.
What am I doing wrong?