Skip to content
  • 8 Votes
    1 Posts
    287 Views
    barisB

    Since NodeBB 1.18.6 it is possible to create dropdowns in the navigation (https://github.com/NodeBB/NodeBB/issues/9967). Before 1.18.6 to accomplish this you would have to use nodebb-plugin-customize to modify the menu template or use javascript to inject the markup after page load.

    In this tutorial I will show you how to create a dropdown navigation item that replaces the default categories link with a dropdown. The final result will look like this:

    category-dropdown.gif

    First thing to do is to turn the navigation item into a dropdown, to do this head over to yourforum.com/admin/settings/navigation, select the categories navigation item and toggle the dropdown option.

    category-dropdown-1.gif

    Once this is done you can use the text area below the toggle to add your markup. To create a simple dropdown you would just add a list of dropdown items like so:

    <li><a class="dropdown-item" href="/categories">All</a></li> <li><a class="dropdown-item" href="/category/2/general-discussion">General Discussion</a></li>

    Since you can input html here you can create custom dropdowns. To achieve the same dropdown as the first gif use the below html code, no css is necessary.

    <li><a class="dropdown-item" href="/categories">All</a></li> <li class="dropdown-divider"> <li><a class="dropdown-item" href="/category/2/general-discussion">General Discussion</a></li> <li class="d-flex flex-column"> <a class="dropdown-item" href="/category/3/nodebb-development">NodeBB Development</a> <div class="d-flex flex-column px-4"> <div class="d-flex align-items-center gap-1"> <i class="fa fa-fw fa-caret-right text-primary"></i> <a class="btn-ghost-sm text-sm text-nowrap" href="/category/13/nodebb-blog">NodeBB Blog</a> </div> <div class="d-flex align-items-center gap-1"> <i class="fa fa-fw fa-caret-right text-primary"></i> <a class="btn-ghost-sm text-sm text-nowrap" href="/category/5/feature-requests">Feature Requests</a> </div> <div class="d-flex align-items-center gap-1"> <i class="fa fa-fw fa-caret-right text-primary"></i> <a class="btn-ghost-sm text-sm text-nowrap" href="/category/6/bug-reports">Bug Reports</a> </div> <div class="d-flex align-items-center gap-1"> <i class="fa fa-fw fa-caret-right text-primary"></i> <a class="btn-ghost-sm text-sm text-nowrap" href="https://explore.transifex.com/nodebb/nodebb/">NodeBB Localization</a> </div> </div> </li> <li><a class="dropdown-item" href="/category/7/nodebb-plugins">NodeBB Plugins</a></li> <li><a class="dropdown-item" href="#">...add more as needed...</a></li>

    Modify the links to match your forum categories. To create dividers between sections you can use <li class="dropdown-divider">

    Now you can navigate your categories without going to the home/categories page. 🎊

  • 0 Votes
    1 Posts
    197 Views
    K

    Hi Community,

    I've recently upgraded from 1.12.x to 1.16.x and I've done it first on a testing environment and, upon success, on production environment.

    Today, after a few days from the upgrade, I've realized that on the production instance the list of categories from category-drop down menu, is completely missing either on front-end (typical case when you want to move a thread) and on back-end (typical case when you want to set privileges).

    Production instance(left) Vs Test instance (Right)
    comparins_prod-test.jpg
    I've no clue what could be the case and how to get it fixed.

    Thanks, Riccardo

  • 1 Votes
    2 Posts
    522 Views
    D

    I'd love to use this plug-in, but when I installed it with Lavender theme, it created issues with categories (invalid category IDs, unable to create new categories, unable to post in existing categories).

    Once I uninstalled this plug-in, all was fine.

    Is there perhaps a newer version that works with Lavender?

  • 0 Votes
    2 Posts
    1k Views
    julianJ

    The data for the menu isn't present in the categories route, that's why nothing shows... seems odd to put menu in that route, any particular reason? People here can likely find some alternative...

  • 0 Votes
    2 Posts
    2k Views
    PitaJP

    There are not hierarchical permissions in NodeBB. If you would like to see hierarchical permissions, you could open an issue on our Github page and request such a feature.

    I do believe we have a way of copying permissions between groups, so that could help you out in doing what you want.

  • 1 Votes
    9 Posts
    4k Views
    B

    @pichalite

    hadnt noticed it... dang it lol i was thinking about group mods.

  • 0 Votes
    1 Posts
    1k Views
    N

    Ability to collapse trees in ACP preview for Categories.

  • 0 Votes
    5 Posts
    3k Views
    S

    @julian said:

    Pagination may be a bad idea because we make the categories sortable on this list.

    I not understand, but thanks, you everytime help for me. I created issue.

  • 0 Votes
    5 Posts
    3k Views
    PitaJP

    An issue detailing this bug should probably be submitted on Github.

  • 0 Votes
    3 Posts
    2k Views
    barisB

    Category data is not avaiable in the header, if you want to use it you will have to use the hook filter:middleware.renderHeader and add the data.

  • 0 Votes
    1 Posts
    1k Views
    S

    Hi,

    I noticed that in the unread page, if i have some "legacy" posts that is unread, and subsequently the category is disabled, it will still remain in the unread page.

    However, when one clicks on the post, it will show a 404 error.

  • 0 Votes
    8 Posts
    3k Views
    barisB

    This should do it I think.

  • Aspect Ratio

    General Discussion
    2
    0 Votes
    2 Posts
    1k Views
    A

    @Guiri I use 450px x 450px and set them to cover.

  • 1 Votes
    8 Posts
    3k Views
    A

    @psychobunny sounds good, I've finally got around to looking at theming, got a great (probably) idea for a theme. 😆

  • 0 Votes
    4 Posts
    2k Views
    A

    @dylenbrivera https://github.com/psychobunny/nodebb-plugin-classic-home

    Next theme may have a more classic homepage as well.

  • 2 Votes
    5 Posts
    3k Views
    ?

    @a_5mith no problem 🙂 this is just an idea for a feature...