Adding custom links, such as Views pages is only available in the 6.x-2.x version of the XML sitemap module.

Option 1:

  1. Enable the 6.x-2.x XML sitemap custom sub-module.
  2. Manually add the links to your views at admin/settings/xmlsitemap/custom

Option 2:

  1. Enable the 6.x-2.x XML sitemap menu sub-module.
  2. Create a new menu at admin/build/menu/add with the menu name xmlsitemap and title XML sitemap. Make sure that the 'Include this menu in the sitemap.' checkbox is selected.
  3. Edit your view's page view, and add the view to the 'XML sitemap' menu under the 'Page settings'.

Comments

sanook17’s picture

how can this be achieved in 7.x-2.x?

nemethf’s picture

The pathes are changed in Drupal 7
Option 1:

  1. Enable XML sitemap custom module
  2. add custom pages to xml sitemap on the following path:

    /admin/config/search/xmlsitemap/custom/add

Option 2:

  1. Enable XML sitemap menu module
  2. Administer the menus: /admin/structure/menu
  3. Alternatively you can enable the desired menu to appear in the xml sitemap here:

    /admin/config/search/xmlsitemap/settings
divined’s picture

How to add all paginated pages to the XML sitemap?

jduimstra’s picture

Just did this in Drupal 7. We had 13 pages of pagination, around 600 products to get into sitemap.xml.

The steps:

  1. Modules/XML Sitemap: Check "XML sitemap node" (Adds content links to the sitemap.)
  2. Configuration/Search and Metadata/XML sitemap/Settings: Click on the "Content" tab. Go to your View created content, click on it.
  3. In the XML sitemap tab, set Inclusion to Included. Save.
  4. Back to Configuration/Search and Metadata/XML sitemap/ - click on Rebuild Links. You'll now have all of the Views created pages listed in sitemap.xml
neurojavi’s picture

Thanks you for the information but I'm sorry, I think you are mistaken here...
As far as I know what you get with your instructions is your 600 articles listed in your xmlsitemap, not your views listing pages.
I don't know how to get /blog, /blog?page=2 /blog/page=3 ... to be included in the site map but the way you mention has nothing to do with this (AFAIK)

I'm not able to find any information about this...

Anyone out there?

quickly’s picture

I agree with @neurojavi... anybody has a solution?

PlayfulWolf’s picture

It is just a subscribe...

zevai’s picture

Maybe my tricky solution would help someone. For views pages i've used hook in custom module, which automatically adds views pages to xmlsitemap on open. It uses xmlsitemap_custom module storage. These pages can be viewed in admin/config/search/xmlsitemap/custom. It is not good way, but it can be basic for further modification or as quick temporary solution.

/**
* Implements hook_views_post_render().
*/
function MYMODULE_views_post_render(&$view, &$output, &$cache) {
  if($view->name == 'display_products') {
    $loc = '';
    // you can get path here for your needs, it is specific to project. i'm using clean urls on views
    if(substr($_GET['q'], 0, '8') == 'catalog/') $loc = $_GET['q'];
    if(substr($_GET['q'], 0, '7') == 'catalog' && isset($_GET['page'])) $loc = 'catalog?' . $_SERVER['QUERY_STRING'];
    if($loc) {     
      if (!db_query_range("SELECT 1 FROM {xmlsitemap} WHERE loc = :loc AND status = 1 AND access = 1 AND language = :language", 0, 1, array(':loc' => $loc, ':language' => LANGUAGE_NONE))->fetchField()) {
        $link = array(
          'type' => 'custom',
          'loc' => $loc,
          'id' => db_query("SELECT MAX(id) FROM {xmlsitemap} WHERE type = 'custom'")->fetchField() + 1,
        );
        xmlsitemap_link_save($link);
      }      
    }
  }
}

Don't forget to add dependencies to module info file:

dependencies[] = xmlsitemap
dependencies[] = xmlsitemap_custom
dependencies[] = views 
Watergate’s picture

Subscribing

rickdrup’s picture

Has anyone found a workable solution for indexing paginated views pages on links rebuild?

maciej.zgadzaj’s picture

This might help - XML sitemap views. Just created it for a temporary need, might not develop it any further, but someone might find it useful...