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.
Hello
I tried to embed a views by code with contextual links. It does not work with views_embed_view, so i used view_get_view() and then use views_add_contextual_links on my renderable array, setting "$location" to 'view" .
On my site, views_add_contextual_links(&$render_element, $location, $view, $display_id) does not work if $location is set to "view", because of this line ( see attached patch)
$plugin += array('contextual links locations' => array('view'));
as the key 'contextual links locations" is already defined in "$plugin" at this moment, arrays union does not add 'view' value.
Comment | File | Size | Author |
---|---|---|---|
contextual_links_locations.diff | 777 bytes | nyl_auster | |
Comments
Comment #1
dawehnerThis is at least from my perspective by design see
You probably should choose another kind of display if you want to have the contextual link.
There is another really recent issue which will allow you to configure this all the time so ...
Comment #1.0
dawehnerprecisions on php error.