Skip to content
Code-Schnipsel Gruppen Projekte
Commit 5b60af43 erstellt von Michael Danielczok's avatar Michael Danielczok
Dateien durchsuchen

fix: no js error if there is no linked page in other language.

Related: #144

Closes: #144
Übergeordneter 2e2869d1
No related branches found
No related tags found
1 Merge Request!17fix: no js error if there is no linked page in other language.
......@@ -35,7 +35,6 @@ public function __construct($attributes = [])
'dropdownText' => 'text', // false: disable text, `abbreviation`: i.e. DE, EN, `text`: i.e. German, English
'dropdownPosition' => 'right', // 'right', 'left'. stick to right or left bottom control corner
'showArrow' => true, // enable arrow down
'data-qui' => 'package/quiqqer/bricks/bin/Controls/LanguageSwitches/DropDown',
'flagFolderPath' => URL_BIN_DIR.'16x16/flags/'
]);
......@@ -75,7 +74,7 @@ public function getBody()
$langs = $Project->getLanguages();
$counter = 0;
$showDropdown = true;
$showDropdown = false;
foreach ($langs as $lang) {
$a = $Site->existLang($lang);
......@@ -84,8 +83,9 @@ public function getBody()
}
}
if ($counter <= 1) {
$showDropdown = false;
if ($counter > 1) {
$showDropdown = true;
$this->setJavaScriptControl('package/quiqqer/bricks/bin/Controls/LanguageSwitches/DropDown');
}
$Engine->assign([
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren