Closed Sogl closed 1 year ago
Related issue: https://github.com/getgrav/grav-plugin-langswitcher/issues/65
I found what was the problem and found a solution. Just because login and langswitcher menus dynamically creates from themes/typhoon/typhoon.php in onSiteThemeMenu($event) function, we need to change these lines:
themes/typhoon/typhoon.php
onSiteThemeMenu($event)
155 | $base_lang_url = Utils::url($language->getLanguageUrlPrefix($lang)); 156 | $lang_url = $base_lang_url . $langswitcher->page_route . $page->urlExtension();
on those:
if ($langswitcher->translated_routes[$lang]) { $lang_url = $langswitcher->translated_routes[$lang] . $page->urlExtension(); } else { $base_lang_url = Utils::url($language->getLanguageUrlPrefix($lang)); $lang_url = $base_lang_url . $langswitcher->page_route . $page->urlExtension(); }
according to new changes in langswitcher: https://github.com/getgrav/grav-plugin-langswitcher/blob/master/templates/partials/langswitcher.html.twig#L10
Need to somehow keep such parts of the code in sync with plugins changes 😄
Makes total sense now, i forgot to update those as part of the langswitcher revamp.
Fixed in next release.
Related issue: https://github.com/getgrav/grav-plugin-langswitcher/issues/65
I found what was the problem and found a solution. Just because login and langswitcher menus dynamically creates from
themes/typhoon/typhoon.php
inonSiteThemeMenu($event)
function, we need to change these lines:on those:
according to new changes in langswitcher: https://github.com/getgrav/grav-plugin-langswitcher/blob/master/templates/partials/langswitcher.html.twig#L10
Need to somehow keep such parts of the code in sync with plugins changes 😄