Empty dashboard single page

Permalink
Hi!
I am creating a settings page for a theme (not a job, a free one in the marketplace). The single page link its shown in the dashboard, but when I enter it it's empty...
I have compared it with other single pages from addons and there's no difference.

view.php:
<?php    
$fmc = Loader::helper('form/color');  
$fm = Loader::helper('form');  
$al = Loader::helper('concrete/asset_library');
if($this->post('logoimgchk')){
$co = new Config();
$co->setPackageObject(Package::getByHandle('marticps_consensus'));
$co->save('marticps_consensus', $this->post('logoimgchk')); 
$co->save('marticps_consensus', $this->post('logoimg')); 
$co->save('marticps_consensus', $this->post('sitenamechk')); 
} 
?>
<?php echo Loader::helper('concrete/dashboard')->getDashboardPaneHeaderWrapper(t('Consensus Theme Settings'), false, false, false);?>
   <div class="ccm-pane-body">
      <table id="add_event" class="entry-form">


Thank you a lot!
Martí

marticps
 
Mainio replied on at Permalink Best Answer Reply
Mainio
I think there's nothing wrong with your single page code.

This usually happens because of typos. The view.php (or page_name.php) should lie EXACTLY in the location that matches the specified path.

So, if you use:
SinglePage::add('/dashboard/path/to/your/page');


Your view file should be EITHER in:
/single_pages/dashboard/path/to/your/page/view.php

or
/single_pages/dashboard/path/to/your/page.php



Usually in a situation like this you find out that you missed one directory there or e.g. left the "dashboard" out from the page path.

You cannot fix this only by changing the directory path, rather you should completely remove the broken single page and then add that again.

Other option is to go to Dashboard => Pages & Themes => Single Pages => and click "Refresh" under the correct page.

Antti / Mainio
marticps replied on at Permalink Reply
marticps
Yeah!
I found an space in a dir name!

Thank you :)