function do_list() { if (!$this->params['limit_to_current_site']) { $site_indexed_items =& $this->get_items_by_site(); echo '<h3 id="site_index">Site Index<h3>'; echo '<ul>'; foreach( $site_indexed_items as $site => $items ) { $anchor[$site] = strtolower(htmlspecialchars(str_replace(" ", "_", $site))); echo '<li><a href="#'.$anchor[$site].'">'.$site.'</a></li>'; } echo '</ul>'; foreach( $site_indexed_items as $site => $items ) { echo '<h4 id="'.$anchor[$site].'">'.$site.' (<a href="#site_index">back to index</a>)</h4> '; echo '<ul>'."\n"; foreach( $items AS $item ) { $this->show_list_item( $item ); } echo '</ul>'."\n"; } } else parent::do_list(); }