Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 8

CurtisOdenericgillette +6 guests

adding new menu item to default mega theme

This discussion is related to the Vanilla Default addon.
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

  • Posts: 1,290
    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.