sitemap icon indicating copy to clipboard operation
sitemap copied to clipboard

Multi-locale domain support, fixes #17

Open groe opened this issue 9 years ago • 6 comments

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.

groe avatar Jan 29 '16 16:01 groe

@joshuabaker If you have any feedback on this, I'm happy to improve it. Let me know what you think.

groe avatar Feb 14 '16 01:02 groe

@joshuabaker Have you had time to have a look at it yet?

groe avatar May 02 '16 12:05 groe

@joshuabaker Hey, is there any chance this will be merged anytime soon?

jakob-o avatar Sep 14 '16 14:09 jakob-o

@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 avatar Jan 25 '17 14:01 stenvdb

@Stenvdb Have you tried calling addAlternateUrl on the Sitemap_UrlModel object which is returned from addUrl?

groe avatar Jan 25 '17 15:01 groe

@groe Ah, looked over that, works like a charm. Again, thanks!

stenvdb avatar Jan 25 '17 15:01 stenvdb