4

I have a module with a page callback handler for the path "products". So if the user navigates to products/apples then the module presents a page about our apples, and if they go to products/oranges then etc. These pages include detail about the various products.

I would like XML Sitemap to be populated from my module. After all, it's my module that knows what products exist, their descriptions etc.

Any hook or anything I can use for that?

1 Answer 1

4

The base function you call is xmlsitemap_link_save().

I am unaware of any documentation on how to use this, but nodes get added to the sitemap via xmlsitemap_node_nodeapi() which in turn calls xmlsitemap_node_create_link(). The code for that should provide some guidance on how to build $link.

1
  • Brilliant, thanks. Looks like I just loop through my paths chucking them at xmlsitemap_link_save() with 'type'=>'custom'. Thank you! Commented Dec 2, 2011 at 16:57

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.