';
if ($variables['title']) {
$output .= '
' . $variables['title'] . '
';
}
if ($variables['content']) {
$output .= '
' . $variables['content'] . '
';
}
$output .= '
';
}
return $output;
}
/**
* Returns HTML for a feed icon with link.
*
* @param $variables
* An associative array containing:
* - url: The url of the feed.
* - type: The type of feed icon.
*/
function theme_site_map_feed_icon($variables) {
$output = '';
switch ($variables['type']) {
case 'node':
$output = theme('image', array(
'path' => drupal_get_path('module', 'site_map') . '/feed-small.png',
'title' => t('Syndicate content'),
'alt' => t('Syndicate content'),
)
);
break;
case 'comment':
$output = theme('image', array(
'path' => drupal_get_path('module', 'site_map') . '/feed-small-comment.png',
'title' => t('Syndicate comments'),
'alt' => t('Syndicate comments'),
)
);
break;
}
if (!empty($variables['url'])) {
$output = l($output, $variables['url'], array('attributes' => array('class' => 'feed-link'), 'html' => TRUE));
}
return $output;
}
/**
* This is a clone of the core template_preprocess_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.
*
* Preprocesses the rendered tree for theme_site_map_menu_tree().
*/
function template_preprocess_site_map_menu_tree(&$variables) {
$variables['tree'] = $variables['tree']['#children'];
}
/**
* 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.
*
* Returns HTML for a wrapper for a menu sub-tree.
*
* @param $variables
* An associative array containing:
* - tree: An HTML string containing the tree's items.
*
* @see template_preprocess_menu_tree()
* @ingroup themeable
*/
function theme_site_map_menu_tree($variables) {
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.
*
* Returns HTML for a menu link and submenu.
*
* @param $variables
* An associative array containing:
* - element: Structured array data for a menu link.
*
* @ingroup themeable
*/
function theme_site_map_menu_link(array $variables) {
$element = $variables['element'];
$sub_menu = '';
if ($element['#below']) {
$sub_menu = drupal_render($element['#below']);
}
$output = l($element['#title'], $element['#href'], $element['#localized_options']);
return '