Browse Source

add default view locale parameter

develop
Simon Vieille 2 weeks ago
parent
commit
67add99175
  1. 1
      core/Controller/Site/PageController.php
  2. 3
      templates/page/simple/page.html.twig

1
core/Controller/Site/PageController.php

@ -42,6 +42,7 @@ class PageController extends AbstractController
'_page' => $this->siteRequest->getPage(),
'_menu' => $this->siteRequest->getMenu(),
'_navigation' => $this->siteRequest->getNavigation(),
'_locale' => $this->siteRequest->getNavigation()->getLocale(),
'_store' => $this->siteStore,
];
}

3
templates/page/simple/page.html.twig

@ -72,6 +72,9 @@
Locale:
<ul>
<li>
Var: {{ _locale }}
</li>
<li>
Navigation: {{ _navigation.locale }}
</li>

Loading…
Cancel
Save