@julian Thanks for the link to nodebb-plugin-quickstart, the really important bit for me was the comment in nodebb-plugin-quickstart/lib/controllers.js:
Make sure the route matches your path to template exactly.
If your route was:
your template should be:
and you would render it like so:
I hadn't seen that mentioned anywhere else. So, if I understand custom routes finally, there are really three important routes really:
- The normal Express route which renders the full page with the header. This handles browser requests straight to the custom route.
- API route for Ajaxify. The custom plugin code sends some json, which nodebb adds some additional json to.
- Template route for Ajaxify, which is implied from the url for the api path.