Jul 29, 2012

f Comment

Make Joomla Always Enable Menu in Admin Panel in SECONDS!

First take a look at my Joomla version
Amazon The following is information shown by going to Site -> System Information.

PHP Built OnLinux ip-10-1-2-3 4.5.6-7-ec2 #18-Ubuntu SMP Mon Oct 18 21:00:20 UTC 2010 i686
Database Version5.1.61-0ubuntu0.10.04.1
Database Collationutf8_general_ci
PHP Version5.3.2-1ubuntu4.14
Web ServerApache/2.2.14 (Ubuntu)
WebServer to PHP Interfaceapache2handler
Joomla! VersionJoomla! 2.5.4 Stable [ Ember ] 2-April-2012 14:00 GMT
Joomla! Platform VersionJoomla Platform 11.4.0 Stable [ Brian Kernighan ] 03-Jan-2012 00:00 GMT
User AgentMozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19

As you can see I use Joomla 2.5.4, but this tutorial applies to every previous version of Joomla. If not let me know!

Problem
Amazon If you use Joomla website's administration panel a lot you'd find it annoying that Joomla grays out or hides the menu when you navigate to some submenu item. For example when I go to Template and select some template I see the following:

Joomla Admin Panel Menu Disabled or Grayed Out

The top menu is grayed out and disabled and you CANNOT navigate to any of the menu items!

Joomla's team's intention of doing this is to protect you from causing business logic or database inconsistencies because you should take some action in the current page before you navigate to another main menu item. However this is annoying because very often I'd like to still be able to click on the menu or the submenu. For example I may want to create a new article without leaving the page. Granted I could open a new tab in the browser and navigate to the appropriate menu item but if the admin panel's menu was enabled I could easily middle click my mouse to create a new tab for creating a new article.

Here's a great use case for always enabling admin panel's menu. I create a new menu item and would like to point to some article only to find out I haven't written the article yet. Therefore I need to write the article first; then link the menu item to it. Had the admin panel's menu been enabled this task could've been easily achieved!
How Do I always enable the top menu in Joomla's backend administration panel?

Solution
Easy. Simply open administrator/modules/mod_menu/mod_menu.php for edit and make the following changes:

...
//$enabled = JRequest::getInt('hidemainmenu') ? false : true;
$enabled=true;
...

We simply comment out the original way of setting value of $enabled; then set $enabled to true no matter what.

That's it! Now regardless of what page you are on the admin panel's heading menu will ALWAYS be enabled!

Be careful if you navigate away from the current page where you are required to complete some action on the current page before moving on. As I mentioned earlier if you just navigate away you may cause inconsistencies in Joomla's database or framework.
Any questions? Let me know!
Please leave a comment here!
One Minute Information - by Michael Wen
ADVERTISING WITH US - Direct your advertising requests to Michael