/ Published in: PHP
PHP Template override by Benjamin Melançon of Agaric Design.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php /** * Override theme_menu_item_link * <a href="http://api.drupal.org/api/function/theme_menu_item_link/5 " title="http://api.drupal.org/api/function/theme_menu_item_link/5 ">http://api.drupal.org/api/function/theme_menu_item_link/5 </a> */ function phptemplate_menu_item_link($item, $link_item) { // make external links open in new windows $attributes['target'] = '_blank'; } return l($item['title'], $link_item['path'], $attributes, isset($item['query']) ? $item['query'] : NULL); } ?>
URL: http://agaricdesign.com/note/open-external-urls-a-new-window