For some reason the view embedding on My Workbench doesn't provide the contextual links that usually go along with Views. Here's a feature request to change that.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

robeano’s picture

Assigned: Unassigned » stevector
Category: feature » task
Priority: Normal » Minor

Yep, both views are missing the context menu. This needs to be fixed. Lowering priority and assigning to stevector to work on this when he has some time.

agentrickard’s picture

Category: task » bug

I suspect this is the culprit.

  // Transform the Views into markup.
  // @see views_embed_view()
  foreach (element_children($output) as $key) {
    if (isset($output[$key]['#view']) && $view = views_get_view($output[$key]['#view'])) {
      $output[$key] += array('#markup' => '', '#view_display' => 'default');
      $display_id = $output[$key]['#view_display'];
      if ($view->access($display_id)) {
        $output[$key]['#markup'] .= $view->preview($display_id, array());
        if ($title = $view->get_title()) {
          $output[$key]['#title'] = $title;
        }
      }
      $view->destroy();
    }
  }

views_embed_view() doesn't include the contextual links.

drupalmonkey’s picture

Status: Active » Needs review
FileSize
1.96 KB

Got the contextual links to work, please test!

agentrickard’s picture

Status: Needs review » Needs work

This would all need to be wrapped in an if (module_exists('contextual')) { call, wouldn't it?

drupalmonkey’s picture

Status: Needs work » Needs review
FileSize
2.01 KB

You are quite correct, agentrickard!

Rerolled patch with the module check.

Please test with core Contextual Links module enabled and disabled.

agentrickard’s picture

Status: Needs review » Fixed

Committed!

8969ed2..b26284b

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.