Reputation: 457
I'm working on a theme that utilises Layouts quite heavily and have come across the 'Visibility Rule' section which I have never noticed before.
Can anyone explain how this is used and perhaps give a use case for it, as I can't find anything in the docs.
Thanks!
Upvotes: 0
Views: 244
Reputation: 17814
This is for custom logic to rule the visibility of an element. Let's say you want to hide an element based on some criterion. You can specify the condition in there, and it will get evaluated. If it evaluates to true, it's visible, otherwise it will be hidden.
The code that does the evaluation is in ElementRuleCoordinator
and relies on IConditionManager
, which is the exact same interface that's used for evaluating widget rules for widget layers. If you go to the layer documentation, you can find examples.
Upvotes: 1