What's the best way to include views contextual filter pages to sitemap? I need the sitemap and all my pages submitted to Google WMT.

What I have right now is a node type Book and a node type Author. I have managed to build a view that takes all the books belonging to an author in a structure like /node/%/books, where the contextual filter is calling the NID type Author with a relationship given by an entity reference, from Books to Authors.

For Drupal 6, there was a module here, as suggested here. For Drupal 7, it doesn't work.


  • why do you need separate sitemaps for each author? Can't you just use the XML Sitemap module? – 2pha Apr 21 '15 at 23:55
  • Sorry, I think I understand. You want this view with the contextual filter in the sitemap. – 2pha Apr 21 '15 at 23:56
  • No, I need the page generated by view filter to be part of the sitemap. Right now, Author nodes are in the sitemap, like site.com/author-name, my Book nodes are in the sitemap as well, like site.com/author-name/books/book-name, but the contextual filter URL site.com/author-name/books is not. This is the one I would like to include in the sitemap and I can't use a menu because there will be too many pages generated like this and the menu cache will jump through the roof. – designarti Apr 22 '15 at 5:35
  • What I would probably do is leverage the 'sitemap custom' module that comes with the xml_sitemap module. You could write a module that programmatically creates a new custom sitemap path when a node of type author is saved, adding that particular authors views path. – 2pha Apr 22 '15 at 6:38
  • Thanks! Thought there's an easier way, without writing custom modules. I'm having second thoughts on indexing that, because it might look as duplicate content, although kinda groups content into.. let's say categories. I'm thinking Google might index this page anyways, if I build a menu containing links to filter pages and use canonical url for these. – designarti Apr 22 '15 at 6:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.