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.

Show only main categories

This discussion is related to the Categories → Menu addon.


  • hgtonighthgtonight Moderator
    edited April 2013

    @digihub No problem. I like helping people that are polite, follow the rules, and reward community members contributions.

    Welcome to the community!

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • edited April 2013

    @hgtonight you are great !

    I need to learn more and you always have something good, thanks :)

  • @vrijvlinder well I got the link up now I have removed the jQuery and try to show all categories but getting messy. My purpose is to show all Main categories (1 level deep) below the company logo and search bar. And move the Discussions and Activity stuffs to the top right corner. Can the css help?

  • edited April 2013

    Hmm I am not sure what it is you are trying to do, I do know that to fit all that in the menu you need to add this

    ul#Menu {
    display: inline-block;
    margin-right: 280px;
    vertical-align: bottom;
    width: 100%;

    If you want to add the categories how you want on the menu or elsewhere, you can add the links manually. That is if you have a set of main categories that you want to use.

    $this->Menu->AddLink('Travel', T('Travel'), '/categories/travel');

    You can manually add this to the list of links from the menu in your default.master.php of your theme.

    if you want to remove a link you do not want to show

    $this->Menu->RemoveLink('Categories', T('United States'), '/categories/travel-unitedstates');

  • Somehow its not working with css. Where should I add this on default.master.php page? Thanks.
    $this->Menu->RemoveLink('Categories', T('United States'), '/categories/travel-unitedstates');

  • This one is nice. Thanks.
    $this->Menu->AddLink('Travel', T('Travel'), '/categories/travel');

  • Yes in your default.master.php
    Find this part and add or remove links here.

    <?php echo Gdn_Theme::Logo(); ?>
                      $Session = Gdn::Session();
                        if ($this->Menu) {
                            $this->Menu->AddLink('Dashboard', T('Dashboard'), '/dashboard/settings', array('Garden.Settings.Manage'));
                            // $this->Menu->AddLink('Dashboard', T('Users'), '/user/browse', array('Garden.Users.Add', 'Garden.Users.Edit', 'Garden.Users.Delete'));
                              $this->Menu->AddLink('Home', T('Home'), '/');
                                                      $this->Menu->AddLink('Activity', T('Activity'), '/activity');
                                                      $this->Menu->RemoveLink('Categories', T('United States'), '/categories/travel-unitedstates');
  • Remove link is still not working.

  • ok this will keep those on the bottom from showing. It will remove United States, and the others next to it. Put in your custom.css

    ul#Menu li ul li {
    display: none;
  • The reason for the remove link not working is that the url was wrong below is the correct link I believe.

    $this->Menu->RemoveLink('United States', T('United States'), '/vf2/categories/travel-unitedstates');

  • I have been looking for custom.css with no luck. I currently changing the theme with applications/dashboard/design/style.css
    Can I add the code here or create the custom.css on the same file?

  • are you using the default theme? it does not have a custom.css but you could make one. Now if you want more options to edit I recommend you try one of my themes , I know them well and have many options.



    Then I can help you modify them to your liking . I know them well . The glass one is good because it changes looks by just changing the background and nothing else.

    But if you want to edit the default, I suggest you create a custom.css file and add it to the default theme, there you can add the edits.

    Do not edit anything in the dashboard files. You will ruin it for all other themes if you do.

  • Yes, I am using the default theme and I really like it. I will try yours and see. Thanks.

  • SrggamerSrggamer ✭✭✭

    @digihub I still recommend looking @vrijvlinder themes because they shall teach you alot.

  • lol Thanks, I think he is using one now, I noticed a few things I did not like so I updated the theme. The radio should be in the right place now. If you want to use the Glass theme please update it.

  • I am checking and learning both default and vrijvlinder's themes. You guys are great.

  • edited April 2013

    I noticed a mistake a missing semi colon here causing bad size on content

    #Content {
    -moz-box-shadow: 2px 2px 3px rgba(0,0,0,0.5);
    -webkit-box-shadow: 2px 2px 3px rgba(0,0,0,0.5);
    background-color: transparent;
    background-image: url(images/contnt.png);
    background-repeat: repeat;
    background-size: 100% 100%;
    border: 1px solid #222;
    box-shadow: 2px 2px 3px rgba(0,0,0,0.5);
    margin-left: 10px;
    min-width: 20%!important;
    padding: 0;
    width: 65%;
    border-radius: 5px;

    The part width was missing semicolon in the end, also in the css, change menu_bg2 to menu_bg so it points to the right image. arg I will update again , but these are just small details you can fix

  • SrggamerSrggamer ✭✭✭

    @digihub thats how you learn.

  • SrggamerSrggamer ✭✭✭

    @vrijvlinder said:
    lol Thanks, I think he is using one now, I noticed a few things I did not like so I updated the theme. The radio should be in the right place now. If you want to use the Glass theme please update it.

    You are one that told me to do so.. Grr!

  • edited April 2013

    I also noticed that you will need to edit the links to some images . Like the favicons you need to put in the correct links to your forum. Look inside the theme's default.master.php and find the stuff that has images ad change what you need. This one is for the back to top button notice it has /vf2/ , you need to add that where needed

    img src="/vf2/themes/Glass/design/images/b2t.png"



Sign In or Register to comment.