Would it be possible to suppress the Drupal menu name for output on the Site Map page? For example, if a menu "Main Menu" is chosen as the source, it would be desirable to have the site map page with a header "Site Map" but not also "Main Menu" directly underneath it.

Comments

vchen’s picture

Hi westatvideo,

This worked for me. I copied a snippet code from sites/all/modules/site_map/site_map.theme.inc (lines 29 -56 inclusive) and paste it into the bottom of sites/all/themes/[YOUR_THEME]/template.php. I deleted lines 39 and 46-48 that printed the menu title, or you can copy the following code that's already deleted the bits of code that prints the menu title.

/**
 * Returns HTML for a themed site map box.
 *
 * @param $variables
 *   An associative array containing:
 *   - title: The subject of the box.
 *   - content: The content of the box.
 *   - attributes:  Optional attributes for the box.
 */
function [YOUR_THEME_NAME]_site_map_box($variables) {

  $content = $variables['content'];
  $attributes = $variables['attributes'];

  $output = '';
  if (!empty($title) || !empty($content)) {
    $output .= '<div' . drupal_attributes($attributes) . '>';
   
    if (!empty($content)) {
      $output .= '<div class="content">' . $content . '</div>';
    }
    $output .= '</div>';
  }

  return $output;
}

1. Replace [YOUR_THEME_NAME] with the name of your theme.
2. Save, upload/commit/, clear Drupal cache

Hope that helps!

akalata’s picture

Assigned: opstao » Unassigned
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.