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.
Is there a context condition for views in the 8.x version? I want to have some blocks appear only when viewing specific views, and I would prefer to not base it on a path.
Comment | File | Size | Author |
---|---|---|---|
#6 | context-views-condition-2938094-6.patch | 4 KB | Janez Zibelnik |
#5 | context-views-condition-2938094-5.patch | 4 KB | Janez Zibelnik |
#2 | context-views-condition-2938094-2.patch | 3.74 KB | Janez Zibelnik |
Comments
Comment #2
Janez Zibelnik CreditAttribution: Janez Zibelnik at Agiledrop - Your Trusted Drupal Teammates commentedHi, I created a patch for this.
Comment #3
Janez Zibelnik CreditAttribution: Janez Zibelnik at Agiledrop - Your Trusted Drupal Teammates commentedComment #4
icurk CreditAttribution: icurk at Agiledrop - Your Trusted Drupal Teammates commentedThe patch works great. But please add dependency injection for \Drupal::routeMatch() service, which is used in evaluate method on line 106.
Comment #5
Janez Zibelnik CreditAttribution: Janez Zibelnik at Agiledrop - Your Trusted Drupal Teammates commentedCreated a new patch adding the dependency injection for \Drupal::routeMatch().
Comment #6
Janez Zibelnik CreditAttribution: Janez Zibelnik at Agiledrop - Your Trusted Drupal Teammates commentedI used the wrong namespace in my previous patch. Sorry about that. Here is the fixed patch.
Comment #7
icurk CreditAttribution: icurk at Agiledrop - Your Trusted Drupal Teammates commentedReviewed the patch. It looks good now. Thanks.
Comment #9
boshtian CreditAttribution: boshtian at Agiledrop - Your Trusted Drupal Teammates commentedComment #12
FrancescoQ CreditAttribution: FrancescoQ commentedI've just updated to the last dev updated on 2018-03-20T07:43:18+00:00 as i can see from my composer.lock.
When i try to add the View inclusion condition I receive an ajax error and it says: