Want to display topic category name and tags above the topic-footer-buttons

Hi Team,

I want to display the topic category name and tags above the topic-footer-buttons and below the same as displayed below the topic title as shown below:

I have seen that we have PluginOutlet “topic-above-footer-buttons” in the topic.hbs template, But it is only displayed for the logged-in users.

Is there any other way to display the topic category name and tags above the topic-footer-buttons for both logged-in and anonymous users?

Thanks.

Please give some suggestions to display the topic category name and tags above the topic-footer-buttons.

I’m going to go out on a limb here and say this is an error: why restrict the plugin outlet to CurrentUser only? there’s nothing about the data it passes which requires a user to be logged in.

My suggestion is to move it out of the if clause so it is exposed in either case.

So you have two choices:

  • Consider a PR to core to fix this so you can use it for Anon without having to override the entire template
  • Override the template for the time being

If you PR be careful this doesn’t break any existing tests (which you may have to modify at the same time).

Thanks, Robert for the reply

There is a plugin “discourse-presence” in the core discourse that uses this plugin-outlet to display the presence of the user on the topic. This only renders for the logged-in users and it is a valid case.

So I think we should create PR to add a new Plugin-outlet to the next line of the “this.loadedAllPosts” condition.

Ex: <PluginOutlet @name="topic-below-container-posts" @tagName="span" @connectorTagName="div" @args={{hash model=this.model}} />

Thanks.

Good catch, but I don’t think you should base your decision on the basis of an existing plugin. But if that plugin is not fail-safe you might want to PR there too :sweat_smile:

The names of the outlets are based on location usually. What are you going to call any additional one? Sounds a bit messy to have two for the same location use of which is only based on whether someone is logged in or not …

Anyway, submit and it will be reviewed.

yeah, thanks for your suggestion.