Defining custom routes
-
Hello,
About a week ago I stumbled upon NodeBB & thought to give it a try. I'd like to point out that I'm a beginner with the Node.js environment, so getting into it has been very difficult.
Anyway, the reason why I'm posting here is that I can't figure out the way how to create custom routes to display dynamic forum content. So here is the scenario:I have the Vanilla theme installed & I've successfully edited the layouts to fit my needs. Now I'm stuck at the part where I need to create a new route (/forum) & assign it as a menu item. How can I achieve this? (Note: I've already added the href="{relative_path}/forum" value to one of my menu items. I've also created a new layout file called forum.tpl in the Vanilla templates directory as well.)
Any help is much appreciated! -
Custom routes are defined by plugins, since the routing actually has to be created by NodeBB.
You'll need to write a plugin that listens for the action:app.load hook and calls a relevant method to add the routes