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.
I have added to my view some rules links with some core node links such as delete and edit.
After them I have added global field called Contextual Links (which was commited in the last version of Views module).
but the Rules Link in the contextual links displays as non-proccessed HTML.
I have changed implementation of the Rules Links field for views to be similar to the node links Delete and Edit. They hide Path field in the "Output this field as a link" section and use this option to insert link URL there.
Comment | File | Size | Author |
---|---|---|---|
#7 | 1508244-7.patch | 1.76 KB | Anonymous (not verified) |
#6 | 1508244-6.patch | 1.69 KB | Anonymous (not verified) |
#3 | rules_link_in_view_example.zip | 3.83 KB | berdyshev |
rules_link-support_of_conditional_links.patch | 1.23 KB | berdyshev | |
Comments
Comment #1
mitchell CreditAttribution: mitchell commentedCould you please provide an example view for testing?
Comment #2
sepgil CreditAttribution: sepgil commentedComment #3
berdyshev CreditAttribution: berdyshev commentedI've attached the feature with views, rules and rules_link configuration. You need to have all of these modules installed and content type called Article should exist on your site.
This view will add new tab in Main Menu called Articles, when you will see contextual links for each row of view (you need to create some articles). In the contextual menu of each row you will see only two links (Edit and Delete) without patch, and three links (Edit, Delete and Unpublish) with applied patch.
Comment #4
Chipie CreditAttribution: Chipie commentedBerdArt, have you found a solution?
Comment #5
berdyshev CreditAttribution: berdyshev commentedChipie, I have attached patch in the issue, it solves the problem.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedI had to re-roll this patch for latest dev-x.
Solution works. Also solves #2257407: html doesn't render on views rules link
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #8
sepgil CreditAttribution: sepgil commentedThx for this great patch, I've committed it.
Comment #11
argiepiano CreditAttribution: argiepiano commentedJust a quick note about this patch. It fixes the issue with contextual links, but it creates another problem. I'm using an EVA field within a View. This EVA field is another View that contains Rules Links. The Rules Links in this EVA field lose their "?destination" segment at the end of the URL after the patch has been applied. I haven't had time to see why - I thought I'd report this issue. I reversed the patch and the Rules Link in the EVA field now works as expected (redirecting to the original view after execution).