How can I make my own plugin which has a setting page?

Plugin Development
  • I added ./templates/admin/plugins/sort-by-votes.tpl. But it does not show at admin/plugin tab. What else thing should I do?

    This is my plugin.json:

        "id": "nodebb-plugin-category-sort-by-votes",
        "name": "Sort by Votes",
        "description": "Adds functionality to sort topics by votes in category list view",
        "url": "",
        "library": "./library.js",
        "hooks": [
                "hook": "filter:topics.get", "method": "addTopicsVotesInCategory"
        "templates": "public/templates",
        "staticDirs": {
            "sortbyvotes": "public"
  • Two things. You need to add the route and controller for that url, and you need to add a link to the admin header.

    Look at nodebb-plugin-quickstart

    Add the routes in the load hook. The controller function is defined here, here is also where you render the template and can add additional data if you wish.

    Use the hook to add a link to the admin header. Like shown here.

  • @yariplus
    Thanks your tips works for me.

Suggested Topics