Hide subcategories without hiding their topics in topic list?

The template for items in the topic list only shows the link to the topic’s category, like this:
{{category-link topic.category}}

So you would need to modify this template to show links to the parent category:

{{#if topic.category.parentCategory}}
  {{category-link topic.category.parentCategory}}
{{else}}
  {{category-link topic.category}}
{{/if}}

But if you only want this to happen for a specific parent category, you’d need to add more logic. I don’t know what would be the recommended way to do that, registering a handlebars helper?

Another approach could be to always show both category and parent links and then hide the ones you don’t want with CSS.