Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Several available modules enhance Block Visibility Groups.
Proposed resolution
Add the following to the project page:
The following modules provide additional conditions that can be used with Block Visibility Groups:
- Menu Condition provides a condition based on menu position. For example, you can use it to specify that a block should only show for a particular menu item and all its children.
- Term Condition provides a simple Condition plugin which checks to see if the current node has a specific taxonomy term.
- Token Conditions creates a simple Token matching condition plugin.
- Vocabulary Condition provides a vocabulary visibility condition. See also #2281659: Create a vocabulary condition.
Remaining tasks
User interface changes
None.
API changes
None.
Data model changes
None.
Comments
Comment #2
tedbow@dewpurdy this will be available but will probably be in another module. I will report back here and update the project page.
The way Drupal 8 works is there Condition plugin system. So if I make another module that has a Taxonomy Condition then it will work with this module and others.
Comment #3
nedjoSwitching this to a documentation task. Suggested addition to the project page:
The following modules provide additional conditions that can be used with Block Visibility Groups:
Comment #4
nedjoUpdating summary.
Comment #5
nedjoComment #6
nedjoComment #7
tedbow@nedjo, thanks for providing the wording! I just added ctools and put on the project page.
Marking fixed but if I got something wrong or if others want to add more re-open.
Comment #9
nedjoThere are a bunch more condition modules. No doubt we should come up with a better place to track them. For now, though, here are the additional ones:
Comment #10
romainj CreditAttribution: romainj as a volunteer commentedAnd the Block Scheduler module (https://www.drupal.org/project/block_scheduler).
Comment #11
mlncn CreditAttribution: mlncn as a volunteer and at Agaric for Drutopia, MASS Design Group, Portside commentedand and:
Comment #12
joverI came across this module: Views Condition - https://www.drupal.org/project/views_condition