2

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.

4
  • have you found a solution?
    – ZioBudda
    Commented Dec 5, 2012 at 1:51
  • I just used the xmlsitemap module
    – uwe
    Commented Dec 5, 2012 at 3:47
  • What do you mean with, "some nodes that have a certain term reference field"?
    – avpaderno
    Commented Dec 5, 2012 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
    Commented Dec 5, 2012 at 17:34

2 Answers 2

2

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

1

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 and acknowledge you have read our privacy policy.

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