Skip to content

A platform for community discussion. Free, open, simple.

DEV: Add topic-category-link-wrapper outlet around the category link in topic title section (#42520)

Chris Albertie4f8b88ea34f
diff --git a/frontend/discourse/app/components/header/topic/info.gjs b/frontend/discourse/app/components/header/topic/info.gjs
index 4204b2c5f65..97e6997a508 100644
--- a/frontend/discourse/app/components/header/topic/info.gjs
+++ b/frontend/discourse/app/components/header/topic/info.gjs
@@ -149,7 +149,10 @@ export default class Info extends Component {
<div class="categories-wrapper">
<PluginOutlet
@name="header-categories-wrapper"
- @outletArgs={{lazyHash [email protected]}}
+ @outletArgs={{lazyHash
+ topic=@topicInfo
+ }}
>
{{#if @topicInfo.category.parentCategory}}
{{#if
diff --git a/frontend/discourse/app/components/topic-category.gjs b/frontend/discourse/app/components/topic-category.gjs
index 162a7894894..1d2fd392941 100644
--- a/frontend/discourse/app/components/topic-category.gjs
+++ b/frontend/discourse/app/components/topic-category.gjs
@@ -12,13 +12,18 @@ import dDiscourseTags from "discourse/ui-kit/helpers/d-discourse-tags";
export default class TopicCategory extends Component {
<template>
<div ...attributes>
- {{#unless this.topic.isPrivateMessage}}
- {{dBoundCategoryLink
- this.topic.category
- ancestors=this.topic.category.predecessors
- hideParent=true
- }}
- {{/unless}}
+ <PluginOutlet
+ @name="topic-category-link-wrapper"
+ @outletArgs={{lazyHash category=this.topic.category topic=this.topic}}
+ >
+ {{#unless this.topic.isPrivateMessage}}
+ {{dBoundCategoryLink
+ this.topic.category
+ ancestors=this.topic.category.predecessors
+ hideParent=true
+ }}
+ {{/unless}}
+ </PluginOutlet>
<div class="topic-header-extra">
{{#if this.siteSettings.tagging_enabled}}
<div class="list-tags">