How to force absolute links on a menu tree in Drupal 7 What I have

I currently have a menu with subitems printed out in my page.tpl like this:

in template.php


   function THEMENAME_preprocess_page(&amp;$vars, $hook) {

       $sitemap_tree = menu_tree_all_data('menu-sitemap');
       $vars['sitemap_expanded'] = menu_tree_output(i18n_menu_localize_tree($sitemap_tree));


}


then in page.tpl.php I have


     print render($sitemap_expanded); 


What I want

While this prints out the entire menu tree perfectly I need the links to be absolute in stead of relative (what they are now).
Any way of doing this in a Drupal fashion without too much extra lines ?

Thanx all.
What you probably want to do is theme the menu links differently for this menu.  In D7, you would  be overriding this function:

/**
 * Returns HTML for a menu link and submenu.
 *
 * @param $variables
 *   An associative array containing:
 *   - element: Structured array data for a menu link.
 *
 * @ingroup themeable
 */
function theme_menu_link(array $variables) {
  $element = $variables['element'];
  $sub_menu = '';

  if ($element['#below']) {
    $sub_menu = drupal_render($element['#below']);
  }
  $output = l($element['#title'], $element['#href'], $element['#localized_options']);
  return '&lt;li' . drupal_attributes($element['#attributes']) . '&gt;' . $output . $sub_menu . "&lt;/li&gt;\n";
}


In menu_tree_output(), it also sets up per menu theme overrides, so, in your template.php file, you could create your own YOURTHEME_menu_link__MENU_NAME() function.  On first flush, it could look something like this:

function YOURTHEME_menu_link__menu_sitemap(array $variables) {
  $element = $variables['element'];
  $sub_menu = '';

  if ($element['#below']) {
    $sub_menu = drupal_render($element['#below']);
  }
  $output = l($element['#title'], $element['#href'], array_merge($element['#localized_options'], array('absolute' =&gt; TRUE)));
  return '&lt;li' . drupal_attributes($element['#attributes']) . '&gt;' . $output . $sub_menu . "&lt;/li&gt;\n";
}


but this is an intellectual exercise for me, not a real world one, since I don't have a D7 sandbox to test it out in but it looks pretty accurate, or at least a starting point.