From e22370a8e18e93d81139158f93dfacabb27f225b Mon Sep 17 00:00:00 2001 From: Jordan Vidrine <30537603+jordanvidrine@users.noreply.github.com> Date: Wed, 14 Oct 2020 11:52:45 -0500 Subject: [PATCH] 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. --- app/assets/javascripts/discourse/app/templates/tags/show.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/templates/tags/show.hbs b/app/assets/javascripts/discourse/app/templates/tags/show.hbs index dded4a10840..ca59b27c9bc 100644 --- a/app/assets/javascripts/discourse/app/templates/tags/show.hbs +++ b/app/assets/javascripts/discourse/app/templates/tags/show.hbs @@ -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)) "")}}