Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Langswitcher adds "/home" to alternate language links

Started by Thomas 7 years ago · 0 replies · 373 views
7 years ago

Hi all,
I have installed langswitcher on 2 multilanguages websites and all is OK, including using slugs.
On a 3rd website, except on home page, langswitcher is adding "/home" to alternate urls.
When I am on a French page, this is what shows:
[code]<link rel="alternate" hreflang="fr" href="https://example.fr/page-abc" />
<link rel="alternate" hreflang="en" href="https://example.fr/en/home/page-abc" />[/code].
The /home is also added to the FR or EN alternate links but nowhere else in the navigation.

It seems to be created by "rawRoute" in $data->page_route = $page->rawRoute(); of langswitcher.php but I cannot find how to remove this "/home". I compared site & system config files of different websites, reinstalled plug-in... but cannot find how to get rid of this /home...

Any idea how to remove it to avoid duplicate links and redirections ?

I come from self-taught html/css and enjoyed working with Grav during the past 9 months, including theming. Thanks for the good work of all, including on tutorials & forum: 1st time I need to ask!

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 49 1 week ago
Plugins · by Xavier, 4 weeks ago
2 57 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1184 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 50 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 75 2 months ago