Hello again!
I'm currently fleshing out a "Profile" Page Type that will be used to display various biographical information for people. Part of this includes a distinction between "Faculty", "Students", and a few other categories and subcategories. To make the distinction, I'm using the "Multiple categories selector" so an editor can simply check a few boxes depending on whether a profile belongs to a Faculty member, a Student, an Alumni, etc. There are a number of other categories the editor has to select, so seeing the full category tree makes this form control convenient.
However, there are a few fields that will only be useful for certain categories, e.g. an "Office" text field for Faculty but not for Students/Alumni.
Is there a way for me to reference the selected categories of the current page (in the editor) in order to set a visibility condition on some of these more niche fields?
I have a "Multiple categories selector" field with a code name of Person_Category
, but so far I've been unsuccessful in getting any data out of it for use in a "Visibility condition".
I've read that these categories are attached to the page itself, so while I can use the categories just fine in transformations to show/hide field data output via {% CurrentDocuemnt.IsInCategories("Faculty") %}
, I can't tell if CurrentDocument
is usable in the editor for visibility.
Any guidance here would be appreciated, thanks!