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.
Hi,
I've set-up a nodequeue displayed as a view in a block.
Is there a way to have a link to "admin/structure/nodequeue/my-id" in the block contextual links?
Thanks
Laurent
Comment | File | Size | Author |
---|---|---|---|
#13 | nodequeue-contextual-links-1177464-12.patch | 3.97 KB | elvis2 |
#8 | nodequeue-contextual-links-1177464-8.patch | 4 KB | corbacho |
#7 | nodequeue-contextual-links-1177464-7.patch | 5.73 KB | corbacho |
Comments
Comment #1
bleen CreditAttribution: bleen commentedsubscribing (and +1-ing)
Comment #2
Steven.Pescador CreditAttribution: Steven.Pescador commentedSubscribing
Comment #3
azinck CreditAttribution: azinck commentedI've just contributed an initial version of Nodequeue Extras that does this. Give it a try and let me know about any issues you find.
Comment #4
amateescu CreditAttribution: amateescu commentedGreat! But I'm wondering why didn't you contribute it as a patch instead, seems like a tiny piece of code that could be added to the main codebase :)
Comment #5
azinck CreditAttribution: azinck commentedamateescu: That's a good point. The other item in Nodequeue Extras (the new relationship handler) does its work in a fairly non-traditional way by using a placeholder argument that is leveraged to pipe criteria into the join, rather than the where clause), so I felt that one needed to be in its own module rather than sticking that hack-ish code into Nodequeue itself. I happened to already have the contextual link functionality already written up in the module, too, so decided to just run with publishing them together. It may have been a bad call. I'm happy to have any of the Nodequeue Extras functionality integrated into Nodequeue as you see fit, and would be happy to help roll patches to that end.
Comment #6
DamienMcKenna+1 for rolling it as a patch, but either way thanks to azinck for writing the functionality.
Comment #7
corbacho CreditAttribution: corbacho commentedPatch against the current stable version (7.x-2.0-beta1)
Steps I did to create the patch:
1. git clone https://drupal.org/project/nodequeue_extras and checkout 7.x-1.x
2. Patch https://drupal.org/node/1619400 (patch # 2)
curl https://drupal.org/files/nodequeue_extras-n1619400-2.patch | git apply -
3. Patch https://drupal.org/node/1920700 Patch # 1
curl https://drupal.org/files/nodequeue_extras-refactor_nesting-1920700.patch | git apply -
4. I copied the hook alter to a suitable place in nodequeue module. I didn't copy those extra special relationships files and I removed 2 lines of code.
Maybe you might need them for special case about subqueues.
5. Added an extra checkbox to nodequeue admin settings form. (The variable with the same name was already being used in nodequeue_extras module):
[x] Show contextual links.
Comment #8
corbacho CreditAttribution: corbacho commented#7 Oops!, The attached patch has strange characters because of coloured diff settings.
This is a well-formed patch:
Comment #9
ParisLiakos CreditAttribution: ParisLiakos commentedComment #10
ParisLiakos CreditAttribution: ParisLiakos commentedPatch looks good but one thing
those names are pretty big for contextual links. i would remove the name and just leave edit queue/subqueue.
its the same behavior with block or views. it does not display the view name or block name.
besides that its ready to go imo
Comment #11
elvis2 CreditAttribution: elvis2 commentedThanks for the patch. I agree with #10.
Comment #12
elvis2 CreditAttribution: elvis2 commentedI rerolled #8 with suggested changes from #10. I also added a permission check to make sure the user has access to edit queues.
Comment #13
elvis2 CreditAttribution: elvis2 commentedComment #14
elvis2 CreditAttribution: elvis2 commentedComment #15
ParisLiakos CreditAttribution: ParisLiakos commentedthanks, works nicely for me
Comment #16
kepford CreditAttribution: kepford commentedLooks @elvis2. Tested and it works as expected.
Comment #17
awolfey CreditAttribution: awolfey commentedWorks well.
Comment #19
fizk CreditAttribution: fizk commentedCommitted. Thanks!
FYI: I had to clear the cache to see the new contextual link.
Comment #20
DamienMcKennaFYI if you add an update script with this code it'll trigger the menus to rebuild:
Comment #22
fizk CreditAttribution: fizk commented@DamienMcKenna Thanks, I've committed this update script.
Comment #24
rooby CreditAttribution: rooby commentedComment #25
rooby CreditAttribution: rooby commentedFor anyone else having issues with this there is now a follow up patch in #2468705: Contextual link to edit queue disappears.