Skip to content

Commit

Permalink
[TASK] Count available languages and only show available items in lan…
Browse files Browse the repository at this point in the history
…guage menu
  • Loading branch information
schmigotzki authored and benjaminkott committed Jun 15, 2023
1 parent f73ce80 commit 48f10d8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Resources/Private/Partials/Page/Navigation/Language.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:if condition="{languagenavigation -> f:count()} > 1">
<f:variable name="counter" value="0" />
<f:for each="{languagenavigation}" as="language">
<f:if condition="{language.available}">
<f:variable name="counter" value="{counter + 1}" />
</f:if>
</f:for>
<f:if condition="{counter} > 1">
<div class="footer-language">
<ul id="language_menu" class="language-menu">
<f:for each="{languagenavigation}" as="item">
Expand Down

0 comments on commit 48f10d8

Please sign in to comment.