You are here

function _site_map_front_page in Site map 7

Same name and namespace in other branches
  1. 8 site_map.module \_site_map_front_page()
  2. 5 site_map.module \_site_map_front_page()
  3. 6.2 site_map.module \_site_map_front_page()
  4. 6 site_map.module \_site_map_front_page()

Menu callback for the site map front page.

Return value

string Returns HTML string for front page site map.

1 call to _site_map_front_page()
template_preprocess_site_map in includes/site_map.theme.inc
Preprocesses the variables for site-map.tpl.php.

File

./site_map.module, line 224
site_map.module

Code

function _site_map_front_page() {
  $output = '';
  $class = array();
  $options = array();
  $title = t('Front page');
  $output = l(t('Front page of %sn', array(
    '%sn' => variable_get('site_name', 'Drupal'),
  )), '<front>', array(
    'html' => TRUE,
  ));
  if (variable_get('site_map_show_rss_links', 1) != 0) {
    $rss_link = theme('site_map_feed_icon', array(
      'url' => variable_get('site_map_rss_front', 'rss.xml'),
      'name' => 'front page',
    ));
    if (module_exists('commentrss') && variable_get('commentrss_site', COMMENTRSS_SITE_FRONT_PAGE)) {
      $rss_link .= ' ' . theme('site_map_feed_icon', array(
        'url' => 'crss',
        'name' => 'front page comments',
        'type' => 'comment',
      ));
    }
    if (variable_get('site_map_show_rss_links', 1) == 1) {
      $output .= ' ' . $rss_link;
    }
    else {
      $class[] = 'site-map-rss-left';
      $output = $rss_link . ' ' . $output;
    }
  }
  _site_map_set_option($options, 'site_map_show_titles', 1, 1, 'show_titles', TRUE);
  $class[] = 'site-map-box-front';
  $attributes = array(
    'class' => $class,
  );
  return theme('site_map_box', array(
    'title' => $title,
    'content' => $output,
    'attributes' => $attributes,
    'options' => $options,
  ));
}