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.

adding new menu item to default mega theme

bobthemanbobtheman
edited September 2010 in Vanilla 2.0 - 2.8
how can i add a new menu item to the default mega theme, i see in the default.master.tpl there is a menu list but no href links .. were is it calling the {links} from?

Comments

  • ithcyithcy New
    edited September 2010
    if you have the latest vanilla code you can do this with a plugin. <?php $PluginInfo['JustAMenuLink'] = array( 'Description' => 'Adds a link to the top menu.', 'Version' => '1.0', 'Author' => 'ithcy', 'AuthorEmail' => 'blah@example.com', 'AuthorUrl' => 'http://example.com' ); class JustAMenuLink implements Gdn_IPlugin { public function Base_Render_Before(&$Sender) { $Sender->Menu->AddLink('Blah', T('Blah'), '/blah/', FALSE); } public function Setup() {} }
    That link will be inserted where you see {custom_menu} in the template.

    You can also edit the template directly. at the top you can see {dashboard_link} {discussion_link} etc. Just add a <li><a href="whatever">link</a></li> in there. But of course that will break when the theme is updated.
Sign In or Register to comment.