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.
This commit is contained in:
Le Philousophe
2025-08-09 15:07:57 +02:00
parent 0f799ca084
commit 925807f4c7
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
class: menu-main
links:
- name: '{#menuMainHome#}'
href: '{$baseurl|lang}'
href: '{#baseurl#}'
- name: '{#menuMainScreenshots#}'
href: /screenshots/
- name: '{#menuMainForums#}'
+3 -2
View File
@@ -4,6 +4,7 @@
<label for="{$menu->getClass()}">{eval var=$menu->getName()}</label>
</dt>
{foreach from=$menu->getEntries() key=text item=url}
<dd><span class="bullet"></span><a href="{eval var=$url|lang}">{eval var=$text}</a></dd>
{eval var=$url assign='url'}
<dd><span class="bullet"></span><a href="{$url|lang}">{eval var=$text}</a></dd>
{/foreach}
</dl>
</dl>