How to bring in Latest topics when using category boxes

Try to work with components

You can use: categories-and-latest-topics

In this mode, there is a connection and categories and recent topics.

<script type='text/x-handlebars' data-template-name='components/categories-and-latest-topics'>

<div class='column categories'>
  {{categories-only categories=categories}}
</div>

<div class='column'>
  {{categories-topic-list topics=topics filter="latest" class="latest-topic-list"}}
</div>

</script>

Next, you override: categories-only

<script type='text/x-handlebars' data-template-name='components/categories-only'>

   The contents of the file...

</script>

Perhaps from this file it is necessary to move the box with the categories, or to do simply to change the css.

Options think very many.

https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/components/categories-boxes.hbs

Useful material

1 Like