From 925807f4c7496bded4c6562776d3095f0a34fedf Mon Sep 17 00:00:00 2001 From: Le Philousophe Date: Sat, 9 Aug 2025 15:07:57 +0200 Subject: [PATCH] WEB: Fix localization of URL in menus The lang filter in the template was applied before evaluating the content. Then, the lang filter inside the YAML was evaluated. --- data/en/menus.yaml | 2 +- templates/components/menu_group.tpl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/en/menus.yaml b/data/en/menus.yaml index 233bb6e4..c1f0c93e 100644 --- a/data/en/menus.yaml +++ b/data/en/menus.yaml @@ -2,7 +2,7 @@ class: menu-main links: - name: '{#menuMainHome#}' - href: '{$baseurl|lang}' + href: '{#baseurl#}' - name: '{#menuMainScreenshots#}' href: /screenshots/ - name: '{#menuMainForums#}' diff --git a/templates/components/menu_group.tpl b/templates/components/menu_group.tpl index a6d2cc3c..55517288 100644 --- a/templates/components/menu_group.tpl +++ b/templates/components/menu_group.tpl @@ -4,6 +4,7 @@ {foreach from=$menu->getEntries() key=text item=url} -
{eval var=$text}
+ {eval var=$url assign='url'} +
{eval var=$text}
{/foreach} - \ No newline at end of file +