Adding Dashboard Tabs / Pages When Package is Installed

Permalink 1 user found helpful
Hi,

How can I add a tab/page to someone's dashboard when they install my addon (package)?

I saw this post, but was still confused:http://www.concrete5.org/community/forums/customizing_c5/creating-d...

Thank you.

celwell
 
jgarcia replied on at Permalink Best Answer Reply
jgarcia
Do this in the install function of your package controller:

$pkg = parent::install();
Loader::model('single_page');
$mySinglePage = SinglePage::add(/dashboard/newpage'),$pkg);
$mySinglePage->update(array('cName' => 'My Page Name', 'cDescription' => 'Description of the page'));


Of course, you would need to have the view and controller of this page in the appropriate place. /{your-package-name}/single_pages/dashboard/newpage.php for the view and /{your-package-name}/controllers/dashboard/newpage.php for the controller.

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.