Add language menu

This commit is contained in:
Daniel Siepmann 2023-02-28 08:06:28 +01:00
parent c4f5fe10bd
commit 6a333832a9
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
3 changed files with 37 additions and 2 deletions

View file

@ -1,5 +1,4 @@
base: 'https://workshop.typo3.localhost/'
errorHandling: { }
languages:
-
title: English
@ -13,5 +12,21 @@ languages:
hreflang: en-us
direction: ltr
flag: us
websiteTitle: ''
-
title: Deutsch
enabled: true
base: /de/
typo3Language: de
locale: de_DE
iso-639-1: de
websiteTitle: ''
navigationTitle: Deutsch
hreflang: de-DE
direction: ''
fallbackType: strict
fallbacks: ''
flag: de
languageId: 1
rootPageId: 1
routes: { }
websiteTitle: 'TYPO3 Workshop'

View file

@ -37,6 +37,13 @@ page {
special = list
special.value = 1
}
11 = language-menu
11 {
as = languageMenu
languages = auto
}
20 = files
20 {
as = pageMedia

View file

@ -15,6 +15,19 @@
<a class="pure-menu-link" href="{menuChildPage.link}">{menuChildPage.title}</a>
</li>
</f:for>
<f:for each="{languageMenu}" as="language">
<li class="pure-menu-item">
<f:if condition="{language.available}">
<f:then>
<a class="pure-menu-link" href="{language.link}">{language.title}</a>
</f:then>
<f:else>
{language.title} N/A
</f:else>
</f:if>
</li>
</f:for>
</ul>
</f:for>
</div>