So to answer your question specifically - so every page has a designated API route as well. Take for example this page, which is
Just append /api at the start, and you can get it's data like so:
So from your plugin/theme, it's fairly simple to just do an API call to get it's data with
For your case, it's a bit more complicated because then you'd be making 20 API calls per page, so I actually wouldn't recommend this method. Here's a sample
library.js for your theme (make sure that your NodeBB is completely up-to-date, as I only just added this hook).
This will add the
mainPost data directly into the category view - so in your template you'd be able to do something like
@trevor you might find this useful as well.
@Jelena, for further reading you might find this set of articles useful. Hope I make sense here, GL