Menu

#136 Menu admin

Core Module
closed-accepted
Code/Logic (73)
5
2009-06-09
2009-05-05
No

With the use of CSS and javascript to enhance menus, it can be difficult to support full menu administration on production menus. A different style sheet when menu admin is enabled allows for a more basic view of the menu that supports all the admin features. While this can be implemented by selecting a different menu template, that changes the view for everyone, not just the administrator. It also requires more steps for a novice administrator.

A solution is to include an admin_style_sheet variable in options.ini and have that take effect when a user enables menu admin. The code is simple, one additional if statement in the parseIni() function. The following works for me. I'll attach a modified copy of Menu_Item.php as well in case the code below gets parsed out.

if (!empty($results['admin_style_sheet']) && Menu::isAdminMode()) {
$this->_style = $results['admin_style_sheet'];
}

Discussion

  • Andrew Patterson

    Menu_Item. php

     
  • Anonymous

    Anonymous - 2009-06-09
     
  • Anonymous

    Anonymous - 2009-06-09
    • status: open --> closed-accepted
     

Log in to post a comment.

MongoDB Logo MongoDB