';
if ($title) {
$output .= '
'. $title .'
';
}
if ($content) {
$output .= '
'. $content .'
';
}
$output .= '
';
}
return $output;
}
/**
* Return a themed feed icon.
*
* @param $url
* The feed URL.
* @param $type
* The type of feed icon.
* @return
* A string containing the linked image.
*/
function theme_site_map_feed_icon($url, $type = 'node') {
$output = '';
switch ($type) {
case 'node':
$output = theme('image', (drupal_get_path('module', 'site_map') .'/feed-small.png'), t('Syndicate content'), t('Syndicate content'));
break;
case 'comment':
$output = theme('image', (drupal_get_path('module', 'site_map') .'/feed-small-comment.png'), t('Syndicate comments'), t('Syndicate comments'));
break;
}
if ($url) {
$output = l($output, $url, array('attributes' => array('class' => 'feed-link'), 'html' => TRUE));
}
return $output;
}
/**
* This is a clone of the core theme_menu_tree() function with the exception of
* the site_map specific class name used in the UL that also allow themers to
* override the function only for the site map page.
*
* Generate the HTML output for a menu tree
*
* @ingroup themeable
*/
function theme_site_map_menu_tree($tree) {
return '';
}
/**
* This is a one by one clone of the core theme_menu_item() function that allows
* custom theming of the site map page items.
*
* Generate the HTML output for a menu item and submenu.
*
* @ingroup themeable
*/
function theme_site_map_menu_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL) {
$class = ($menu ? 'expanded' : ($has_children ? 'collapsed' : 'leaf'));
if (!empty($extra_class)) {
$class .= ' '. $extra_class;
}
if ($in_active_trail) {
$class .= ' active-trail';
}
return '