$excluded = array(1,2,42,etc);
if(!in_array($excluded)){
$this->tree .='<a href="'.$link.'">';
$this->tree .= $name;
if($isparent) $this->tree .='<i class="icon-angle-'.((JFactory::getDocument()->direction=='ltr')?'right':'left').' pull-right"></i>';
$this->tree .= '</a>';}