How to create a $navigation main menu with target="_blank" on specific page.tpl.php pages I have a Drupal 7 site using the main menu for all pages. However, I've just added some unique landing pages for some advertising campaigns which all come from 'page--landing.tpl.php'

Oddly, my client wants just the 'page--landing.tpl.php' pages to have the main menu for these pages only work in such a way that the links all open in new windows (like target="_blank").

Does anyone know how to achieve this?

In the 'page--landing.tpl.php' file, the menu is created with:

&lt;div id="menu"&gt;
&lt;?php print $navigation; ?&gt;
&lt;/div&gt;


Thanks for any and all help given.
There are many ways to do this

A quick way would be to use jQuery to rewrite the anchor tags in the menu with the target attribute

$( '.page--landing [menu link selector] ).attr( 'target','_blank' );


Using the Drupal API 

function MODULE/THEMENAME_menu_link_alter(&amp;$item)
{
   if (some logic that sets it only for the desired paths/context)
   {
     $item['options']['attributes']['target'] = '_blank';
   }
}


an example from the documentation for function hook_menu_link_alter

function MODULE/THEMENAME_menu_link_alter(&amp;$item)
{
  if($item['link_path']=="admin/tutorial14333")
  {
  $item['options']['attributes']['target'] = '_blank';
  }
}