Last active
December 1, 2021 01:50
-
-
Save acrosman/ab7e9ffce3996f6bc1798f9f1ca34c06 to your computer and use it in GitHub Desktop.
A Drupal 8 block condition to set visibility based on a node's field value.
Adding a link back to your article https://spinningcode.org/2017/06/controlling-block-visibility-with-a-custom-field-in-drupal-8/ since I found the gist first
Context is now context_definitions:
* context_definitions = {
* "node" = @ContextDefinition("entity:node", label = @Translation("Node"))
* }
Oh thanks for catching that. For anyone interested the change record is here: https://www.drupal.org/node/3016699
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the article and gist. I think https://gist.github.com/acrosman/ab7e9ffce3996f6bc1798f9f1ca34c06#file-sidebarcondition-php-L89 should be: