Reputation: 1183
I've tried to google and read everywhere including here but no comprehensive tutorial can be found about this.
I want to totally change my topbar to something like this
<ul class="nav navbar-nav navbar-right">
<li>
<a href="">Friends</a>
</li>
<li>
<a href="">Inbox</a>
</li>
<li>
<a href="">Dashboard</a>
</li>
<li>
<a href="">Settings</a>
</li>
<li>
<a href="">Logout</a>
</li>
<li>
<a href="../customize">Announcements</a>
</li>
</ul>
I can basically 'hard-code' this in topbar.php but i'm afraid I may not get the links right. Any best practices suggestions out there for this noob?
Upvotes: 0
Views: 453
Reputation: 438
Elgg is designed to be plugin-centric, so by default it's expected that a lot of plugins may want to tap to main menu. There are three paths to follow:
Use tool in admin panel: Configure -> Appearance -> Menu Items
Unregister unnecessary menu items with elgg_unregister_menu_item and than rearrange them through plugin hook. Downside of that is that adding new plugins may add unexpected menu items, but pro is that you may easily redistribute your code without worrying about synchronizing settings set via admin panel.
If you want to take control over whole menu rendering process, you'll want to override view navigation/menu/site
and use any markup you desire. Links should be absolute. Use elgg_get_site_url() as the base.
Upvotes: 0