Sections of Categories on front page or even sub category pages


  • GNU/Linux

    I know how NodeBB lavender and vanilla both use categories in the simple way and it is powerful and feature rich.

    [  category  ]  [   category   ]  [  category   ]
    

    But what if you want to have sections of categories like most forums have:

    Section 1
    -----------------
    Category 1
    Category 2
    
    Section 2
    -----------------
    Category 1
    Category 2
    Category 3
    Category 4
    
    Section 3
    -----------------
    Category 1
    Category 2
    Category 3
    

    This is pretty much the norm for most Forums but seems to take a lot of power away from NodeBB as a stereotypical forum.

    Would love if this could be implemented as norm when adding categories under 'Manage' in the ACP


  • Admin


  • GNU/Linux

    @baris said:

    Check this out https://github.com/NodeBB/nodebb-plugin-category-sections

    my goodnezzzzzz

    Thanks @baris !! :+1:


  • GNU/Linux

    Just had a small prob in the ACP accessing the admin side for the plugin

    11/3 08:19 [11336] - error: /api/admin/plugins/category-sections
     TypeError: Object #<Object> has no method 'list'
        at getCategories (C:\Users\mattw_000\Documents\GitHub\nodebb\NodeBB\node_modules\nodebb-plugin-category-sections\library.js:115:25)
        at renderAdmin (C:\Users\mattw_000\Documents\GitHub\nodebb\NodeBB\node_modules\nodebb-plugin-category-sections\library.js:54:2)
        at Layer.handle [as handle_request] (C:\Users\mattw_000\Documents\GitHub\nodebb\NodeBB\node_modules\express\lib\router\layer.js:82:5)
        at next (C:\Users\mattw_000\Documents\GitHub\nodebb\NodeBB\node_modules\express\lib\router\route.js:110:13)
        at Route.dispatch (C:\Users\mattw_000\Documents\GitHub\nodebb\NodeBB\node_modules\express\lib\router\route.js:91:3)
        at Layer.handle [as handle_request] (C:\Users\mattw_000\Documents\GitHub\nodebb\NodeBB\node_modules\express\lib\router\layer.js:82:5)
        at C:\Users\mattw_000\Documents\GitHub\nodebb\NodeBB\node_modules\express\lib\router\index.js:267:22
        at Function.proto.process_params (C:\Users\mattw_000\Documents\GitHub\nodebb\NodeBB\node_modules\express\lib\router\index.js:321:12)
        at next (C:\Users\mattw_000\Documents\GitHub\nodebb\NodeBB\node_modules\express\lib\router\index.js:261:10)
        at Function.proto.handle (C:\Users\mattw_000\Documents\GitHub\nodebb\NodeBB\node_modules\express\lib\router\index.js:166:3)
    


  • Great plugin!
    I see on Github that the number of recent replies has to be set to 0. Would this plugin still work if you leave like 1 or 2 recent replies?
    I guess the layout will be a bit messier but I would like to know if that option would still be possible before set up this plugin.
    Thanks!


  • GNU/Linux

    @TaLoche doesn't appear to be working anyway..

    that error above traces to line 115 in library.js.. might be missing some hook or dependency cos 'list' doesn't appear to be a method the plugins familiar with, can't access the admin to use plugin :sunglasses:



  • Thanks for your feedback. I'll keep track of this to see how things evolve then.


  • Admin

    Hey guys this plugin only works on latest nodebb so make sure you are up to date.


  • GNU/Linux

    @baris said:

    Hey guys this plugin only works on latest nodebb so make sure you are up to date.

    will try this


  • GNU/Linux

    @Codejet said:

    @baris said:

    Hey guys this plugin only works on latest nodebb so make sure you are up to date.

    will try this

    and now happier for trying it :dancer: big difference


  • GNU/Linux

    Guess I should add that Category Sections works %100 like it should in 0.7.0-dev



  • Hey there, I thought that would be a reasonable place to bring my problem up

    I Installed the plugin on 0.7.1 with **Persona **and everything went smoothly.

    However, the view for the plugin in the ACP is completely broken and unusable.

    acp-categories.png

    Also, I get some drag event error (when dragging the sections on the right) in the console

    drag-event.png

    I tried reinstalling the plugin and whatnot.

    PP: Also, all categories on the front page disappeared and will only show up again when I deactivate the plugin.


  • Admin

    This plugin is only compatible with lavender, unfortunately. That said, there has been a PR that was submitted that puts this functionality into core



  • I've been trying to fix the plugin and sort of managed to get the ACP working correctly. I can see the sections array in the api response from the categories route. However I am quite new to NodeBB and NodeJS and I am not sure how to implement the template file of my theme to render the sections correctly. I am trying to achieve something like this as a look https://www.cryptofr.com/



  • Hi i have problem. I install but in admin i have error:

    "TypeError: $(".section-sortable").sortable is not a function. (In '$(".section-sortable").sortable({connectWith:".section-sortable"})', '$(".section-sortable").sortable' is undefined)"

    and on home page i dont have any category


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.