FEATURE: Add category slug to body class on tag pages if it is part of a category (#10911)

This commit will add the category slug class to the body if the tag is a child of a category.

Currently, when visiting a tag topic list only the tag name is added to the body class.
This commit is contained in:
Jordan Vidrine 2020-10-14 11:52:45 -05:00 committed by GitHub
parent caa58a4bd1
commit e22370a8e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{{#d-section tagName="" pageClass="tags" bodyClass=(concat "tag-" tag.id)}}
{{#d-section tagName="" pageClass="tags" bodyClass=(concat "tag-" tag.id (if category.slug (concat " category-" category.slug)) "")}}
<div class="container">
{{discourse-banner user=currentUser banner=site.banner}}
</div>