links__system doesn't use URL aliases? I'm trying to use the links__system preprocess function to output a menu as a select element, unfortunately though $link['href'] appears to output the URL in a format like:

node/2

Even though the URL alias is set to something like:

nice-url

The code I'm using in my template.php file is as follows:

function THEME_links__system_MENU_NAME($variables) {
  $html = '&lt;select name="" id="dropdown-menu"&gt;';
  $html .= '&lt;option class="" value="home"&gt;Select Item&lt;/option&gt;';
  foreach ($variables['links'] as $link) {
    $html .= '&lt;option class="" value="' .$link['href'].'"&gt;'. $link['title'] .'&lt;/option&gt;';
  }
  $html .= '&lt;/select&gt;';

  return $html;
}


I've had a look at the $variables variable passed to this function, just to make sure I'm not referencing the wrong thing - but it doesn't appear to contain any other items in the array that contain the correct URL alias.

When using the default menu code output by Drupal it picks up the URL aliases and uses them.

What am I doing wrong here?
I managed to get around this by using the drupal_get_path_alias function in the end, so my resulting code was:

function THEME_links__system_MENU_NAME($variables) {
  $html = '&lt;select name="" id="dropdown-menu"&gt;';
  $html .= '&lt;option class="" value="home"&gt;Select Item&lt;/option&gt;';
  foreach ($variables['links'] as $link) {
    $html .= '&lt;option class="" value="'. drupal_get_path_alias($link['href']) .'"&gt;'. $link['title'] .'&lt;/option&gt;';
  }
  $html .= '&lt;/select&gt;';

  return $html;
}


Dissapointed I didn't think to search for such a function in the first place!