Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Menu Asset

edited October 2009 in Vanilla 2.0 - 2.8
For my purposes the "Activity" tab that is shown on the menu (not the per user one) is a bit of a waste of space and well I need the space. But looking at the template there seems to be just a single "Menu" asset to render. Is there a more limited set of assets that you can render one by one?

Comments

  • MarkMark Vanilla Staff
    I've had a hard time deciding what to do with the main menu. The way it is built, addon developers can add to & organize the menu programmatically. However, many people just want to be able to hard-code it so they can remove the things they don't like themselves (perhaps in a theme). I'm still not sure which is the best way to go, so I've left it to be done programmatically for now. If you want to remove the Activity menu item, you can do it with:

    $Menu->RemoveGroup('Activity');
  • Hi Mark -

    I've added that line to default.master.php (and variations including $this->RemoveGroup('Activity');), however all appear to result in an error. I take it you are assuming that the $Menu object exists when the template is executed: is there another name it could be under?
  • MarkMark Vanilla Staff
    In the template you'd need to go:

    if (property_exists('Menu', $this)) $this->Menu->RemoveGroup('Activity');
  • edited October 2009
    Hi Mark -

    That produces a fatal error. If I remove the if it doesn't error, but it still doesn't remove the activity menu. I've tried it before and after the render menu command.
Sign In or Register to comment.