make a component appear only when the current environment is not-closed
Hi all,
On our Community we have closed sections where we test new products together with select users. We want to create a friendly warning when new testers are about to post outside of closed environments. This way we want to prevent leakage of sensitive information about not released products.
I need to build notifications for users with a specific role (product testers) when they are about to make a new topic - or placing a comment - outside of a closed forum.
Here I have found Freemarker stuff to show a components for specific user roles: https://community.khoros.com/t5/Components-endpoints-and-the/Display-components-based-on-role/ta-p/42992
I did search for info on how to show components based on detection closed, hidden or open environments, but didnt find what I was looking for, so:
How can I make a component appear only when the current environment is not closed (and the user has a specific user role)?
With that figured it I can look to add it to the editor section on a topic, and add it to the new message page. Tips are welcome.
PS. I would really love to have parentnode and visibility (open, hidden, closed) added to the datalayer LITHIUM.CommunityJsonObject.Page - and userrole added to LITHIUM.CommunityJsonObject.User.
Based on your use case I would recommend checking out the blog post on access signposting by SuzieH because it sounds like it accomplishes similar to what you’re looking for.