Adding a new dashboard page via a package in 5.7.1
PermalinkI'm new to Concrete5 and relatively new to php also.
I'm trying to create a package containing a form (in a block) and a dashboard page to display the results of that form.
The form allows users to submit feedback on my website, so that I can view that feedback in the dashboard.
The form results are added to a table in the database, where I want the dashboard page to retrieve the data from and display it.
I've been trying for several days to figure out how to add my new single page to the dashboard, to no success.
At the moment when I try to install my package, it throws up that it cannot find the Loader class.
I wondered if somebody could take a look at what I'm doing wrong (or what I've neglected to do completely) and explain like I'm 5 what exactly I've got to do to achieve my goal.
Package Controller:
<?php namespace Concrete\Package\FeedbackFormPackage; use \Concrete\Core\Attribute\Type; use \Concrete\Core\Package\Package; use \Concrete\Core\Block\BlockType\BlockType; use \Concrete\Core\Src\Legacy\Loader; defined('C5_EXECUTE') or die(_('Access Denied.')); class Controller extends Package { protected $pkgHandle = 'feedback_form_package'; protected $appVersionRequired = '5.7.1'; protected $pkgVersion = '0.4'; public function getPackageDescription() { return t("This package allows users to give feedback to the administrator of a website.");
Dashboard page controller:
(feedback_form_package/controllers/dashboard/reports/feedback.php)
Single page view:
(feedback_form_package/single_pages/dashboard/reports/feedback.php)
I really hope somebody can help me out; I'm at a real loss here.
Thanks!
