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.
Options

How can I add/remove or modify links on the nav bar and sidemenu?

I'm wondering how I can manually add my own links to the top nav bar and the side menu? I know that there's locale.php where you can set things such as $Definition['Discussions'] = 'Recent posts'; However that doesn't allow full customization of both the bars and you can't add new ones. And for example the stuff such as {discussions_link}.

Where is the stuff such as {discussions_link} located so that I can add my own? And where is the file located where I can edit the sidenav/menu?

Comments

  • Options
    whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP
    edited November 2014

    Most changes should be made within your custom theme folder.

    To add links, you can edit the theme/views/defaultmaster.tpl file.

    Simply add your required links within{literal} {/literal} tags within the
    <ul class="SiteMenu"> section.

    I'm not sure what you mean by sidenav/menu. Do you mean the panel?

  • Options
    peregrineperegrine MVP
    edited November 2014

    And where is the file located where I can edit the sidenav/menu?

    • there is no specific generic file or specific answer for a panel, each panel has its own code e.g. mebox, categories, etc.

    • I provided you with several tutorials that explain this in other duplicate posts. Have you read them?

    • you can add a link via default.master.tpl, themehooks, or a plugin e.g.
    • http://vanillaforums.org/addon/addmenuitem-plugin or your own custom plugin.
    • many people go on the path what file can I edit to modify this and that.

    basically you change you theme via custom.css, or modifying your tpl, or themehook.
    changing panel information requires a hook into the panel, or changing css to display none for a particular element.

    you can add links via messages, and pockets plugin, or adding a panel.

    general questions, without images specifically showing what you want to remove - are impossible to answer
    since there is no one size fits all.

    re-read the links provided in the other posts.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    @whu606 said:
    Most changes should be made within your custom theme folder.

    To add links, you can edit the theme/views/defaultmaster.tpl file.

    Simply add your required links within{literal} {/literal} tags within the
    <ul class="SiteMenu"> section.

    I'm not sure what you mean by sidenav/menu. Do you mean the panel?

    Thank you! that's exactly what I needed and yeah I mean the side panel thing it looks like this http://prntscr.com/563ek9

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    You can use a php based theme which has the links in the master, the links in a tpl are smarty links. It is a way to add php without the php in the template . The actual links can be found in the Smarty folder in the library under vendors. Do not alter them.

    You can also add smarty based links if you have them I think someone has a list of possible existing smarty links. Search for smarty here.

    To remove modules such as the one in your image look for the modules folders in your applications folder such as dashboard and vanilla and conversations and find the module you are looking for or the available modules, and then create a class.mynewthemehooks.php file if you do not have one, and add a function to unset the module aka asset from all pages Base_Render_Before or single specific pages DiscussionsController_Render_Before functions.

    example:

    public function Base_Render_Before($Sender) {
    unset($Sender->Assets['Panel']['ActivityModule']);
    }
    
  • Options
    R_JR_J Ex-Fanboy Munich Admin

    Look at /library/vendors/SmartyPlugins to find more possible {bla_shortcut} possibilities

  • Options
    whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    Can I also suggest you look here:

    http://vanillawiki.homebrewforums.net/index.php/Custom_Themes_1#Menus

    which will give you an idea of how to customise various aspects of Vanilla.

  • Options
    BIOSBIOS New
    edited November 2014

    @whu606 said:
    Can I also suggest you look here:

    http://vanillawiki.homebrewforums.net/index.php/Custom_Themes_1#Menus

    which will give you an idea of how to customise various aspects of Vanilla.

    I'll have a look at that in detail, just looked at bits of it for now.

    Basically wanting to rename all of these on the sidemenu http://i.imgur.com/vSpE9Zm.png except from New discussion. What would be the "best" method to do it?

    It would be good if I could do the same thing like the var I did with the locale for the top nav bar, for example just do $Definition['Discussions'] = 'Something'; or even yet again using the {literal}... {/literal} tags within the panel class to be easily changeable and not have to go through all of the back.

  • Options
    peregrineperegrine MVP
    edited November 2014

    As I pointed out in the tutorials I gave you that you seemed to ignore. I'll post it once again.

    if you read them, it will help you. If you don't you will continually be asking questions that have already been posted, and answered in one form or another.

    http://vanillaforums.org/discussion/26597/tutorial-how-to-change-wording-how-to-change-text-how-to-change-language-how-to-change-locale

    http://vanillaforums.org/discussion/20231/how-to-become-somewhat-adept-at-modifying-vanilla-to-meet-your-needs-for-free

    if it appears you ignore the links to discussions, tutorials category, and documentation I posted, I'll do the same.

    if you have new questions that don't relate to the slightest to you original question. read the documentation, search the forum, and tuorials.

    if you still don't follow after spending some time looking through documentation and searching forum and reading tutorials, start a new discussion.

    http://vanillaforums.org/discussion/18015/how-to-ask-questions-on-the-internet

    http://vanillaforums.org/discussion/23130/forum-post-ettikett-etiquette

    http://vanillaforums.org/discussion/25115/how-to-how-can-a-new-user-better-help-the-community-

    http://vanillaforums.org/discussion/17954/food-for-thought-forum-etiquette

    http://vanillaforums.org/discussion/23483/advice-for-all-those-just-starting-out-with-vanilla

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    @peregrine said:
    As I pointed out in the tutorials I gave you that you seemed to ignore. I'll post it once again.

    if you read them, it will help you. If you don't you will continually be asking questions that have already been posted, and answered in one form or another.

    http://vanillaforums.org/discussion/26597/tutorial-how-to-change-wording-how-to-change-text-how-to-change-language-how-to-change-locale

    http://vanillaforums.org/discussion/20231/how-to-become-somewhat-adept-at-modifying-vanilla-to-meet-your-needs-for-free

    if it appears you ignore the links to discussions, tutorials category, and documentation I posted, I'll do the same.

    Already read them, they don't seem to help me with this. They include things such as $Definition['%s comment']='%s Vietnamese post'; but that's not telling me how I could do the same thing for the sidemenu since I don't know what the definition is?

    I tried Locale Developer however that didn't seem to work for me. Was trying to edit the core for the sidemenu before but figured out to just use $Definition['old text seen on site'] = 'new text';

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited November 2014

    look at the php files concerning what you want to change, anything that has a T is something you can translate using locale definitions.

    for example

    $this->Menu->AddLink('Menu', T('Dashboard'), '/dashboard/settings', array('Garden.Settings.Manage'));

    The T('Dashboard') is the translatable string . So the definition in the locale would be

    $Definition['Dashboard']="Control Panel";

    I suggest you download another language locale and see all that is translatable via definitions.

  • Options

    Yeah, I understand it a little bit better now and know what to look for.

  • Options
    peregrineperegrine MVP
    edited November 2014

    Yeah, I understand it a little bit better now and know what to look for.

    it takes a bit of effort, experimentation. After a few weeks of reading and experimenting, if you put your mind to it, you will have a greater handle on things.

    you're welcome!

    still think you need more specificity in your questions, etc read the links provided.

    http://vanillaforums.org/discussion/comment/219446/#Comment_219446

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.