stefandoorn / sitemap-plugin

Sitemap Plugin for Sylius eCommerce platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Idea: abstract url generator or use absolute URLs

Jeroen-G opened this issue · comments

$location = $this->router->generate('sylius_shop_product_show', [
'slug' => $translation->getSlug(),
'_locale' => $translation->getLocale(),
]);

Using the UrlGeneratorInterface::ABSOLUTE_URL option will ensure the right protocol (http or https) is used.

An alternative might be to abstract the code to generate an URL to a generator class that users could overwrite/replace.

Seems to have been an issue on my end, closed!