[Solvend] V8.2.1 Dashboard Single Page Controller is not loaded
Permalink
Hello everybody,
I'm trying to install singlepages in a package for the backend dashboard. This works so far. The entries in the backend navigation are available and the pages can also be opened.
However, when I access the Dashboard page, no information is passed from the view () function to the page.
Where is my mistake?
Directory structure:
tests (package)
--- + controllers
------ + single_pages
--------- + dashboard
------------ + tests
--------------- + customers
--------------- customers.php
------------ tests.php
--- + single_pages
------ + dashboard
--------- + tests
------------ + customers
------------ customers.php
--------- test.php
--- controller.php
controller.php (package):
test.php (controller for dashboard single page):
test.php (dashboard single page):
For testing i have attached the package.
Thanks for tips/help.
greetings
LennDa
I'm trying to install singlepages in a package for the backend dashboard. This works so far. The entries in the backend navigation are available and the pages can also be opened.
However, when I access the Dashboard page, no information is passed from the view () function to the page.
Where is my mistake?
Directory structure:
tests (package)
--- + controllers
------ + single_pages
--------- + dashboard
------------ + tests
--------------- + customers
--------------- customers.php
------------ tests.php
--- + single_pages
------ + dashboard
--------- + tests
------------ + customers
------------ customers.php
--------- test.php
--- controller.php
controller.php (package):
<?php namespace Concrete\Package\Tests; use Loader; use Package; use SinglePage; use Core; use Page; defined('C5_EXECUTE') or die(_("Access Denied.")); class Controller extends Package { protected $pkgHandle = 'tests'; protected $appVersionRequired = '8.2.0'; protected $pkgVersion = '0.3.1'; public function getPackageName() {
Viewing 15 lines of 52 lines. View entire code block.
test.php (controller for dashboard single page):
<?php namespace Concrete\Package\Tests\Controller\SinglePage\Dashboard; use \Concrete\Core\Page\Controller\DashboardPageController; use Package; use Core; use Config; use Loader; class Tests extends DashboardPageController { public function view(){ $this->set('testing', 'My regular message'); } }
test.php (dashboard single page):
For testing i have attached the package.
Thanks for tips/help.
greetings
LennDa
Ups, embarrassing.
I must have been blind.
Thank you for your help :)
I must have been blind.
Thank you for your help :)
Its a mistake many of us have made and spent time tearing our hair out. Another one of those silly 5.7/v8 gotchas that doesn't have any particular attention drawn to it in the docs.
Directory structure:
tests (package)
--- + controllers
------ + single_pages <--- single_page
--------- + dashboard