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.
In #1172970: provide a unified way to retrieve result entities a generic way for retrieving entity references has been implemented. This is especially useful for showing Rules Links in a Search API view (for example), which has its own back-end.
The changes to the Rules Link module should be pretty simple. First the entity type needs to be added to the field definition (in hook_views_data) and second the entity id needs to be retrieved in a different way in the render function, but you can see the changes in the patch anyway.
Comment | File | Size | Author |
---|---|---|---|
#6 | rules_link_views_3.patch | 2.17 KB | mh86 |
#5 | rules_link_views_2.patch | 2.08 KB | mh86 |
#3 | rules_link_views.patch | 2.07 KB | mh86 |
Comments
Comment #1
BenK CreditAttribution: BenK commentedSubscribing....
Comment #2
mh86 CreditAttribution: mh86 commentedneeds some other views changes before #1270890: provide a way to provide entity-related views fields
Comment #3
mh86 CreditAttribution: mh86 commentedand here the patch to get Rules Link working with other back-ends (e.g. Search API).
patch needs #1270890: provide a way to provide entity-related views fields and #1291052: update provided views integration to match latest views as well
Comment #4
mh86 CreditAttribution: mh86 commentedForgot to mention that this patch breaks the existing rules link views fields, but we can wait and see how views handles the updates for the new node edit fields etc.
Comment #5
mh86 CreditAttribution: mh86 commentedupdated patch that applies with the Rules Link dev version
Comment #6
mh86 CreditAttribution: mh86 commentedSince #1270890: provide a way to provide entity-related views fields went in, we can now push forward the rules link views integration. See attached an updated version of my patch with following changes:
Comment #7
sepgil CreditAttribution: sepgil commentedcommitted it, thanks for the patch!
Comment #8
sepgil CreditAttribution: sepgil commentedComment #10
giorgio79 CreditAttribution: giorgio79 commentedDid this make it into 7x 2?
I am not seeing any options for Rules Links in Search API Views.