Posted by emattias on February 1, 2012 at 6:14pm
4 followers
| Project: | Views |
| Version: | 7.x-3.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I wanted to add a "order view" contextual link and my view takes nid as contextual filter and depending on the nid contextual filter different order should be used.
Since all the info about the view you have available(that I have found) when adding your own contextual link is stored in $element['#element']['#views_contextual_links_info'] (in hook_contextual_links_view_alter) I came to the conclusion that the arguments have to be added here. My order view link is useless without the arguments..
Porhaps you could argue that the whole $view object should be added to make it available when creating contextual links relating to the view..?
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| adds-args-to-views_contextual_links_info.patch | 405 bytes | Ignored: Check issue status. | None | None |
Comments
#1
Yes adding the full view object is probably the way to go as it's much more consistent with other views hooks.
#2
Here's a patch that provides the full view object.
#3
This looks fine.
#4
Thanks for providing the patch, just committed it to 7.x-3.x
#5
Automatically closed -- issue fixed for 2 weeks with no activity.