Hide some of the content everywhere

Former Member
Former Member

Hi

I'm trying to hide some of the content from community, only the thing is administrators should be able to view the content.

I know that, sending it to moderation will help. but, that's not the case for us.

 Example:-If I want to hide a forum thread, I'm adding a field called hidden in extended attributes and by using an automation with forumthread.Render event I'm trying to hide the content, but It's not working.
#set($context_v2_automationTrigger.Arguments.RenderedHtml ="hidden")




it's just changing the body text as hidden. but I need to hide the whole thread everwhere without changing the default widgets.



Added more info
[edited by: adithya reddy at 12:43 PM (GMT 0) on Fri, Jan 13 2023]
  • Trying to do this at a single content item level is going to be challenging, fragile and realistically since you say its for admins only, not very secure.  Your best bet is really to just create an access restricted application, in your case forum that is only readable by admins.  Then you don't have to change anything interface wise and can target widgets as needed to that application.  Search will automatically filter, etc  It will also be far more secure and flexible