Question

I want to create an extra menu item in front of the dashboard. I call this item Motherboard. So I did the following.

In application/modules/layout/views/layout.php I have added the following code

<li><?php echo anchor('motherboard', lang('motherboard')); ?></li>

before

<li><?php echo anchor('dashboard', lang('dashboard')); ?></li>

In the language file I added the motherboard entry. And in the application/modules i have copied the dashboard folder and renamed it to motherboard. In this folder I changed the controller from dashboard.php to motherboard.php.

When I load FusionInvoice I can see the correct menuitem(Motherboard) so the language file is correct and the layout.php file is also correct. But when I click on the menu item I get 404 page not found error.

So clearly I am missing something. Any help would greatly be appreciated.

Was it helpful?

Solution

I have solved this on a completely different way as I was originally thinking. What I did was the following.

Create a file called "menuitem.php"' In this file create the menuitem and submenuitems if exist

Include this file with all the other files that create the layout. So that it is loaded on all pages.

In menuitem.php create a link to a stylesheet or use inline styles so that you can position the menuitem on the right place.

Use media queries so that is works on all devices.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top