Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I recently had a requirement for rewriting "outbound" links included in an xmlsitemap based on node type. This is relatively easy to do using hook_url_outbound_alter()
however we don't pass the node (bundle) type information exposed inside the xmlsitemap_link array given to url(), though most of the other columns from {xmlsitemap} are.
This is a simple patch to include those two additional columns. This should be backwards-compatible, as the array we're adding to is keyed, anyway.
Comment | File | Size | Author |
---|
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #2
Chris Matthews CreditAttribution: Chris Matthews commentedThe 6 year old patch to xmlsitemap.generate.inc does not apply to the latest xmlsitemap 7.x-2.x-dev and if still applicable needs a reroll.