-
Notifications
You must be signed in to change notification settings - Fork 10
Description
What?
Setting up Drupal Blocks precisely on ADO pages is tricky. The many ways an empty results view is not really empty and ends taking/using space are many. Also even if a View does not generate results, at a view level, deciding how to hide (with custom code, not possible out of the box) the exposed filters is basically impossible. If we depend only on the number of results we can end hiding a filter used, that because or input, ends in finding "nothing" and that needs to be exposed again so the user can undo its decision. Messy
Solution is to add another conditional plugin that uses a JMESPath evaluated against an ADO. Any non empty result evaluates to TRUE and shows the block, or hides if not.
Additionally I would love to add a Contextual Filter Validator for Views that uses a similar approach. Validates the passed ID to be of "ADO" type and also checks for a JMESPATH. that could allow us to avoid the View query at all. Both can complement each other/serve different purposes