The discussion is about adding a category-specific disclaimer in Discourse. nstoecki42 attempted to add a banner above each post in a specific category using a script, but it resulted in the post content being blank.
Arkshine suggested that the issue was due to an error, likely caused by the non-existent find method in the helper. They provided alternative solutions using the h helper or raw HTML, and explained how to add HTML before the cooked content.
nstoecki42 confirmed that Arkshine’s solution worked, and used the post:before widget to display the disclaimer text above all posts in the specified category.
I tried to add a Disclaimer on a specific Category. I had the Idea to have a “banner” - like This is User's first post - let's welcome the new member to our community!
or It's been a while since we've seen USER - the last post was 1 year ago.
above each Post.
MY_DISCLAIMER:
type: string
default: 'This is a Category that comes with limited warranty and is to be used at your own risk.'
description: Disclaimer Text for Category
and there is also common/common.scss with the .disclaimer class in it.
But when I active that the Post itself is no longer shown, the content area is just blank.