I have various types of nodes. One of these types of nodes always redirects to the document attached to the node (through a custom function)

I am trying to hook into the sitemap generation process to add some logic, so if the node is of a specific type, the URL location generated will change.

Looking at xml sitemap I see there may be a hook that will allow this. A point in the right direction would be awesome!

Comments

mrgoodfellow created an issue. See original summary.

dave reid’s picture

Category: Feature request » Support request

I would recommend using hook_xmlsitemap_link_alter() because that way you can alter the 'loc' value of the node's link before it gets saved to the database.

renatog’s picture

Status: Active » Reviewed & tested by the community

#2 really makes sense.

Thank you very much for your help @Dave.

renatog’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.