I have a webpart on a page template that I want to hide if a document is in a particular category. I know how to make a webpart visible based on the document category, but how can I hide it? Is there a way to negate {% CurrentDocument.IsInCategories("CategoryZ") #%} macro?
Maybe you could try:
{% CurrentDocument.IsInCategories("CategoryZ") == false #%}
or
{% !CurrentDocument.IsInCategories("CategoryZ") #%}
Each web part have visible property. So you can use above macro and follow below steps:
Refer attached screenshot for detailed - https://paste.pics/8016290f6714559f38cc522b86e6310c
Thanks, guys! Liam's first suggestion worked perfectly!
Please, sign in to be able to submit a new answer.