문제

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?

도움이 되었습니까?

해결책

The base function you call is xmlsitemap_link_save.

I am unaware of any docs 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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 drupal.stackexchange
scroll top