@julian Yup I know. But I want to code new to understand how to do it
I'm trying to develop a newspaper/blog type theme for NodeBB. Its been about a year since I've looked at the code /templates and have what might be a very basic question.
On the 'categories' home page, using Lavendar / Persona themes as an example, I see that the category is displayed and the latest topic.
What if I wanted to make the display like this:
-- 10 Latest Topics
<!-- BEGIN posts --> .... <!-- END posts -->
However, it appears that there is only one latest post here.
Without modifying the code, is there a way for the theme to specify that it wants an X number of topics. Also, is there a way for the theme to specify that it only wants the topic meta and not the actual full post perhaps?
@shri No real need to modify core code. You should be able to do everything you want inside the hook
The data returned is what you see at
You would modify that by adding a topics array to each category. Using a method similar to what
src/controllers/category.jsdoes to retrieve the topics.
Then in the template you can add a
<!-- BEGIN topics --><!-- END topics -->section for each category.