Custom Dashboard not showing.

Permalink
Hi all,

I have created a dashboard for a theme I have created.

I have the necessary files in fact I just used some bits of code from other packages.

Here it is:

package controller:
class MySamplePackage extends Package {
   protected $pkgHandle = 'my_sample';
   protected $appVersionRequired = '5.2.0';
   protected $pkgVersion = '0.9';
   public function getPackageDescription() {
      return t("A sample package.");
   }
   public function getPackageName() {
      return t("My Sample Package");
   }
   public function install() {
      $pkg = parent::install();
      Loader::model('single_page');
                SinglePage::add('/dashboard/my_sample',$pkg);        
        }


/controllers/dashboard/my_sample/controller.php:
<?php
defined('C5_EXECUTE') or die(_("Access Denied."));
class DashboardMySampleController extends Controller {
}


/single_page/dashboard/my_sample/view.php:
<?php
defined('C5_EXECUTE') or die(_("Access Denied."));
?>
<h1>Hello world!</h1>


When I try to visit /dashboard/my_sample nothing is displayed.

Anyone knows what am I doing wrong here?

BreakfastStudio
 
BreakfastStudio replied on at Permalink Best Answer Reply
BreakfastStudio
Just a simple mistake. I've named my single pages directory "single_page" instead of "single_pages".

Maybe we can add this to the comedy mistake thread.