How to display the un promoted to front page link in teaser mode contextual links? I'm trying to enhance the frontpage teaser's contextual links. On front page content we click on Configure link, and it shows Edit, Delete and Node Export by default.

I'd like to also add a Unpromote from/to frontpage link.

Is this possible? If so, how can it be achieved?
Contextual links can be added by adding a menu item (e.g. hook_menu() or hook_menu_alter()) and setting context to MENU_CONTEXT_INLINE &amp; type to MENU_LOCAL_ACTION. For node actions, you can add a menu item to the node/% route. The nid argument can be passed through so you can execute your appropriate node frontpage toggle logic.

For example:

/**
 * implements hook_menu_alter().
 */
function MYMODULE_menu_alter(&amp;$items) {
  $items['node/%/frontpage'] = array(
    'title' =&gt; 'Toggle Frontpage Status',
    'type' =&gt; MENU_LOCAL_ACTION,
    'context' =&gt; MENU_CONTEXT_INLINE,
    'page callback' =&gt; 'MYMODULE_toggle_frontpage',
    'page arguments' =&gt; array(1),
    'access arguments' =&gt; array('administer content'),
  );
}

function MYMODULE_toggle_frontpage($nid) {
  // @TODO: Add your $node-&gt;promote switching logic.

  // Jump back to the original page containing the context menu.
  drupal_goto(drupal_get_destination());
}