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.

How do I add a new menu Item?

edited February 2012 in Vanilla 2.0 - 2.8

Basically I want to add a link in my current menu back to my website, how can this be done?

Answers

  • Maybe worth downloading a theme, we add menu items on our themes. Off top of my head its default.master.php file but only change this in your theme folder, not core.

    Goto addons on here, themes and have a look at diff themes.

    There was an error rendering this rich post.

  • whu606whu606 MVP
    edited February 2012

    In your theme/views folder edit default.master

    Find this line:

     <?php
                      $Session = Gdn::Session();
                        if ($this->Menu) {

    and below it add:

    $this->Menu->AddLink('Linktitle', T('Linktitle'), 'http://www.linkaddress.com/');

    where, obviously, you replace 'Linktitle' with the name of your link; Home, MySite, etc.

  • Hey @whu606 thats the one. :)

    P.s. Do you wrap your code in code or pre tags ? Try pre may tidy it up.

    There was an error rendering this rich post.

  • @422

    Thanks for that - I was just using the C from the button bar, but 'pre' certainly improves the look.

    Cheers

  • i dont find any thing in my theme folder..but when i edit my file i got this code there,

    $Configuration['Garden']['Menu']['Sort'] = array('Dashboard', 'Discussions', 'Questions', 'Activity', 'Applicants', 'Conversations', 'User');>

    now i want to add Home with link before dashboard, how to do it?

    P.s my forum is at vfacebook.net/forum/

  • whu606whu606 MVP
    edited February 2012

    @vickysadhu

    You need to follow the steps here:

    http://vanillaforums.org/docs/themequickstart

    to create a theme, then follow the instructions in this thread.

    Everything you need to know is on this thread.

  • @whu606 not sure if the automated installation he is using will do that. See foot of his forum.
    Seems to be using: http://installatron.com/apps/vanilla

    There was an error rendering this rich post.

  • @422

    Ah!

    I was assuming access to the server...

Sign In or Register to comment.