So what we were trying to accomplish is that we have certain HTML messages that we want to show sitewide, but instead of entering them individually on every topic, we wanted to just show them automatically depending on a topic tag. What we decided to do is to simply store the messages and tags in the setting and used a widget to target the tags on the individual topics based on the discourse container. Is the correct way to go about this? So something like this:
const container = Discourse.__container__;
const topicController = container.lookup("controller:topic");
tags = topicController.get("target.currentRoute.parent.attributes.tags");
Then just compare the tags on the topic to those stored in the settings and display HTML or not based on the comparsion