sitemap
sitemap copied to clipboard
Multi-locale domain support, fixes #17
I have found some time to dig into this :)
This PR fixes sitemaps for craft sites, that have one shared sitemap.xml
for multiple locales, i.e. when multiple locales share the same domain. Previously the sitemap would lack <url>
tags, as described in #17.
Checking if CRAFT_LOCALE
is defined makes sure that single-locale domains are not affected by this change.
@joshuabaker If you have any feedback on this, I'm happy to improve it. Let me know what you think.
@joshuabaker Have you had time to have a look at it yet?
@joshuabaker Hey, is there any chance this will be merged anytime soon?
@groe Hi, do you think it's possible when adding custom URL's/routes with the addUrl service method, to add support for multi locale url's as well? I don't see any such option in the plugin at the moment.
I know you're not the main plugin author, but since all last fixes were by you.. Thanks in advance!
@Stenvdb Have you tried calling addAlternateUrl
on the Sitemap_UrlModel
object which is returned from addUrl
?
@groe Ah, looked over that, works like a charm. Again, thanks!