Public feed #721346

Something

public text v1 · immutable
Raw Edit
·published 2007-10-01 05:16 UTC
rendered paste body
function nio_menu_links($links) {
  if (!count($links)) {
    return '';
  }
  $level_tmp = explode('-', key($links));
  $level = $level_tmp[0];
  $output = "<ul class=\"links-$level\">\n";
  foreach ($links as $index => $link) {
    $output .= '<li';
    if (stristr($index, 'active')) {
      $output .= ' class="active"';
    }
    #################ADDED FOLLOWING LINE#####################
    if($link['href'] == 'node/15'){
		$link['attributes']['target'] = '_blank';
    }
    ############################################################
    $output .= ">". l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment']) ."</li>\n";
  }
  $output .= '</ul>';
  return $output;
}