In a discussion titled Want to display topic category name and tags above the topic-footer-buttons, saurabhmasc seeks to display category and tag information above the footer buttons for both logged-in and anonymous users. The existing PluginOutlettopic-above-footer-buttons is restricted to logged-in users only, as it’s nested within a CurrentUser condition in topic.hbs. merefield suggests this restriction may be unnecessary and proposes either submitting a PR to remove the restriction or overriding the template temporarily. saurabhmasc notes that the core plugin discourse-presence uses this outlet legitimately for logged-in users only, and proposes adding a new outlet (e.g., topic-below-container-posts) just after the loadedAllPosts condition to avoid breaking existing behavior. merefield acknowledges the point but cautions against letting existing plugins dictate new design, noting potential naming confusion if two outlets serve the same location based solely on login status. saurabhmasc agrees to proceed with a PR for review.
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’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).
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.
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
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 …