Quantcast
Channel: Issues for XML sitemap
Viewing all articles
Browse latest Browse all 1238

Add a URL alter hook when generating the sitemap

$
0
0

Problem/Motivation

We ran into a situation in which we needed to generate a different URL than was created by the Url::fromUri call in XmlSitemapGenerator::generateChunk() on line 315. I noticed that immediately above it is a TODO concerning the creation of a hook, hook_xmlsitemap_base_url_alter, to alter the Url.

The attached patch includes the creation of a hook to modify the Url object before the string is generated.

Remaining tasks

No remaining tasks

API changes

hook_xmlsitemap_link_url_alter is added - checkout the xmlsitemap.api.php file for information.


Viewing all articles
Browse latest Browse all 1238

Trending Articles