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.
For this version the filter block display all content when the node without the terms filtered. Is it possible the block display nothing and not to show this block in this case?
Comment | File | Size | Author |
---|---|---|---|
#5 | 1169366-patch-add-require-terms-on-node-option-3.patch | 1.83 KB | jec006 |
#4 | 1169366-patch-add-require-terms-on-node-option-2.patch | 1.84 KB | jec006 |
#3 | 1169366-patch-add-require-terms-on-node-option.patch | 1.47 KB | jec006 |
Comments
Comment #1
tirdadc CreditAttribution: tirdadc commentedSounds like a good idea, I'll look into it.
Comment #2
astra CreditAttribution: astra commentedJust an idea: when the node without the terms filtered, maybe options can be configured, something like
1) display all other content
2) display nothing
Comment #3
jec006 CreditAttribution: jec006 commentedI've made a patch that will simply show nothing if the node has no terms for valid vocabs.
The display all content is the what current happens, so I simply added a checkbox for showing nothing.
Attached Patch
Comment #4
jec006 CreditAttribution: jec006 commentedCleaned up some Admin stuff - added a default - rerolled patch
Comment #5
jec006 CreditAttribution: jec006 commentedHey,
Adding a version that will work with older versions of drush make (no a/ b/ prefixes) and removing a couple whitespace errors.
This patch seems to be working well after about a month of use.
Comment #6
tirdadc CreditAttribution: tirdadc commentedWorks well, thanks for that. Committed to dev.