I am editing a Discourse, and I have not found what I want to do by default. I wish that on the home page, the categories are in a first block (full width) then below, the list (detailed) of the last subjects is displayed.
The different layout options do not allow this. The closest option displays the categories on the left, and the last topics (light) on the right.
The Revolut community offers a display like this: https://community.revolut.com/ but they are only changed to CSS the two-column view to put it in two row.
To answer my need, I realized that I could simply display the categories with the default layout, and create a plugin that hangs on ādiscovery-belowā.
Unfortunately, I do not see how to get the list of recent topics to assign to my template in my plugin.
Do you have any ideas to guide me in my development?
A good strategy with all modifcations is do the minimum needed: find something that exists that is closest and modify that. This is not just because we are all inherently lazy as programmers, but because you want to have the minimum exposure to risk wrt changes to the core code so your functionality has the best chance of survival with minimal changes going forward.
I hope Iāve understood your requirement correctly. In any case here goes:
I canāt go into huge detail here (as need to put dinner on the table tonight), but hereās the strategy I would employ here:
Note the closest data arrangement to what I think you need is āBoxes with Featured Topicsā. When you simply render the /categories.json in this mode you will note the data comes back in a way that is close to what you might need, that is Categories with short nested lists of topics for each Category - handy!
NB One thing to be wary of is why things are like they are already. The Category Boxes layout is designed to give you a quick view of as many Categories on the same page as possible. Having it all going linearly down the page instead may undesirably push some Categories off screen
One compromise is to just do part 2 only with no layout changes - an added bonus being itās quicker and itās less risky.
Thatās how Iād start to go about this ā¦ you may find your strategy needs modification as you work through it.
Hope thatās helpful and gets you going. Sorry I canāt spend significant time on it at present.