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've been making heavy use of Contextual Links in Drupal 7 projects, as they allow users to edit content on a site without having to navigate the admin interface.
It looks like Webform has contextual links for nodes, but they don't appear when a web form is a block – you get only the "Configure Block" link. Can we get this added?
Comment | File | Size | Author |
---|---|---|---|
#2 | webform_contextual_links.patch | 1.12 KB | quicksketch |
Comments
Comment #1
isaacfreeman CreditAttribution: isaacfreeman commentedHere's a naive solution I've hacked together, based on notes at http://bleen.net/comment/3264
It directly adds a couple of links to the web form block. I'm sure it could be done better, and obviously it would be nicer to have the contextual links as standard in Webform.
Comment #2
quicksketchSweet thanks! I've modified your code into this patch and included it in the project (7.x-3.x branch only of course).
Comment #3
quicksketchUpdating title. I modified your code so that the "Webform" and "Results" links show up on all webform-enabled nodes as well as in Webform blocks.
Comment #5
David_Rothstein CreditAttribution: David_Rothstein commentedThis looks like a great start, but I'm running into a bug with it, and it also seems like the code can be simplified. I posted a patch at #1414666: Webform contextual links are shown to users who don't have access to them, and code can be simplified; reviews welcome if anyone has a chance.