I installed the xmlsitemap module and would like to customize the sitemap.

For example, I would like to exclude some nodes that have a certain term reference field. I would also like to be able to create separate sitemaps for each content type.

Is there a way to do that? Otherwise I could probably generate the xml sitemaps with service_views module.

  • have you found a solution? – ZioBudda Dec 5 '12 at 1:51
  • I just used the xmlsitemap module – uwe Dec 5 '12 at 3:47
  • What do you mean with, "some nodes that have a certain term reference field"? – apaderno Dec 5 '12 at 5:28
  • for example, I want to exclude all nodes that have a tag (term reference) value of "jokes". I tried creating an XML sitemap with views but couldn't get the XML formatted correctly. In views it would be easy to do the inclusions/exclusions ... – uwe Dec 5 '12 at 17:34

You can do the same with xmlsitemap modules

Enable XML sitemap node, XML sitemap taxonomy submodules.

enter image description here

After that you will get these options.

enter image description here

enter image description here


You can use hook_xmlsitemap_link_alter:

function hook_xmlsitemap_link_alter(array &$link, array $context) {
  $nid = $link['loc'];
  if ($nid == 'node/[:id]') {
    $link['status'] = 0;
    $link['access'] = 0;

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.