Since the way to get to a quiz question to edit it is very long, I want add a contextual link to each quiz question.

But somehow I struggle to find a solution. Because it is not a block and not a view.

I have something like this added to my menu_alter hook:

$items['node/%node/edit'] = array(
    'title' => 'Edit',
    'page callback' => 'node_page_edit',
    'page arguments' => array(1),
    'access callback' => 'node_access',
    'access arguments' => array('update', 1),
    'weight' => 0,
    'type' => MENU_LOCAL_TASK,
    'file' => 'node.pages.inc',

and added render($title_prefix) to my template. But somehow it does not work. I know I have to add contextual links to my page at all - but how can I archive this?

  • have you turned on Drupal core's Contextual Links module already? – longboardnode Nov 23 '15 at 20:38
  • @longboardnode yes it's tuned on. – Jurik Nov 24 '15 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.