Hello,
We use Taxonomy Access Control and Taxonomy to categorize our content and configure user permissions. We also use our taxonomy as a replacement for Published/Unpublished in Publishing Options, so we have Category and Category Unpublished. Is there a way to exclude all nodes from the sitemap which have been categorized as a certain term? If this functionality is not currently available, can you provide suggestions as to how we can integrate it into the existing module?
Thank you,
Peter
Comments
Comment #1
dave reidDo you normal anonymous users have access to these nodes that you are wanting excluded? Because the xmlsitemap_node.module uses
node_access('view', $node, drupal_anonymous_user());to determine if the 'link' is included. If your taxonomy access module properly integrates with the node access system, these nodes would be excluded.You can manually de-include each node once #470882: Individual node priority/exclusion is implemented. Otherwise you could modify the xmlsitemap_node_create_link() function to check what you need to check, but I'm always against modifying files.
Comment #2
pmlodzik commentedDave,
Thank you for your prompt reply. Our Taxonomy Access configuration disallows anonymous access to nodes which are categorized as "Unpublished" or certain other restricted categories, so from what you said, it sounds like we should be all set. It's really nice to know that we don't need to tell the module to exclude restricted content.
Thanks again,
Peter
Comment #3
rf-pldev commentedYou could also add your own cron task in a custom module that would set the priority_override value for whatever conditions you need. We have a custom attribute in the term_data table to indicate which terms are used to tag pages vs fragments. This cron method appears to be working well to exclude the fragments from appearing in the sitemap.
Comment #4
dave reidSince an appropriate answer has been provided and this feature already exists, marking as fixed.