xmlsitemap_help

Definition

xmlsitemap_help($section)
contributions/modules/xmlsitemap/xmlsitemap.module, line 16

Description

Implementation of hook_help().

Related topics

Namesort iconDescription
XML SitemapNotify search engines of site updates.

Code

function xmlsitemap_help($section) {
  $output = '';
  switch ($section) {
    case 'admin/settings/xmlsitemap':
    case 'admin/settings/xmlsitemap/settings':
      $output .= t('Configure the site map. Your site map is at !url.', array('!url' => l(xmlsitemap_url('sitemap.xml', drupal_lookup_path('alias', 'sitemap.xml') ? drupal_lookup_path('alias', 'sitemap.xml') : NULL, NULL, NULL, TRUE), xmlsitemap_url('sitemap.xml', drupal_lookup_path('alias', 'sitemap.xml') ? drupal_lookup_path('alias', 'sitemap.xml') : NULL, NULL, NULL, TRUE))));
      break;
    case 'admin/settings/xmlsitemap/engines':
      $output .= t('Configure behavior for search engines.');
      break;
    case 'admin/help#xmlsitemap':
      $output .= '<p>'. t('XML Sitemap automatically creates a site map that conforms to the !sitemaps.org specification. This helps search engines keep their search results up to date.', array('!sitemaps.org' => l('sitemaps.org', 'http://www.sitemaps.org'))) ."</p>\n";
      $output .= '<p>'. t('Your site map is at !sitemap.xml.', array('!sitemap.xml' => l(xmlsitemap_url('sitemap.xml', drupal_lookup_path('alias', 'sitemap.xml') ? drupal_lookup_path('alias', 'sitemap.xml') : NULL, NULL, NULL, TRUE), xmlsitemap_url('sitemap.xml', drupal_lookup_path('alias', 'sitemap.xml') ? drupal_lookup_path('alias', 'sitemap.xml') : NULL, NULL, NULL, TRUE)))) .'</p>';
      $output .= '<h3>'. t('Supporting modules') ."</h3>\n";
      $output .= '<p>'. t('By itself, the XML Sitemap module adds only the front page of your site to the site map. Other types of links are handled by supporting modules.') ."</p>\n";
      $optional = '';
      if (module_exists('xmlsitemap_menu')) {
        $optional .= '<dt>'. t('XML Sitemap: Menu') ."</dt>\n";
        $optional .= '<dd>'. t('<em>XML Sitemap: Menu</em> allows menu items to be added to the site map. You can choose the menus to include on the XML Sitemap administration page and can add and remove menu items on the !menu administration page. The priority of a menu item is determined by its weight.', array('!menu administration' => l('menu administration', 'admin/build/menu'))) ."</dd>\n";
      }
      if (module_exists('xmlsitemap_node')) {
        $optional .= '<dt>'. t('XML Sitemap: Node') ."</dt>\n";
        $optional .= '<dd>'. t('<em>XML Sitemap: Node</em> adds nodes (content) to the site map. The default priority of a node is determined by a combination of its !content type priority, whether it appears on the front page of your site, and the number of comments it has received. You can override the default priority for individual nodes when you add or edit a node.', array('!content type' => l('content type', 'admin/content/types'))) ."</dd>\n";
      }
      if (module_exists('xmlsitemap_term')) {
        $optional .= '<dt>'. t('XML Sitemap: Term') ."</dt>\n";
        $optional .= '<dd>'. t('<em>XML Sitemap: Term</em> adds !taxonomy terms (categories) to the site map. You can change the default priority when you add or edit a vocabulary, and you can override the default priority when you add or edit individual terms.', array('!taxonomy terms' => l('taxonomy terms', 'admin/content/taxonomy'))) ."</dd>\n";
      }
      if (module_exists('xmlsitemap_user')) {
        $optional .= '<dt>'. t('XML Sitemap: User') ."</dt>\n";
        $optional .= '<dd>'. t('<em>XML Sitemap: User</em> adds user profiles to the site map. The <em>anonymous user</em> role must be given permission to access user profiles on the !access control page. You can change the default user priority on the !user settings page. The !user role priority will override the default user priority. You can override both the default priority and the role priority when you add or edit a user.', array('!access control' => l('access control', 'admin/user/access'), '!user settings' => l('user settings', 'admin/user/settings'), '!user role' => l('user role', 'admin/user/roles'))) ."</dd>\n";
      }
      if (!empty($optional)) {
        $output .= "<dl>\n$optional</dl>\n";
      }
      $output .= '<p>'. t('Links may be assigned a priority between 0.0 and 1.0. The default priority is 0.5. A priority of <em>Not in site map</em> excludes a link from the site map.') .'</p>';
      $output .= '<p>'. t('More information is available in the !XML Sitemap documentation.', array('!sitemaps.org' => l('sitemaps.org', 'http://www.sitemaps.org'), '!XML Sitemap documentation' => l('XML Sitemap documentation', 'http://drupal.org/handbook/modules/gsitemap'))) ."</p>\n";
      break;
  }
  return $output;
}