Danke für die schnelle Antwort, folgendes hat Contao ausgespuckt:
[customLanguageText] => a:3:{i:0;a:2:{s:5:"value";s:2:"de";s:5:"label";s:2 :"DE";}i:1;a:2:{s:5:"value";s:2:"en";s:5:"label";s :2:"EN";}i:2;a:2:{s:5:"value";s:2:"ru";s:5:"label" ;s:2:"RU";}}
Ich habe aber leider keine Ahnung was ich jetzt bei dem Template "nav_dropdown" ändern muss ...
PHP-Code:
<?php
$blnHasActive = false;
$intLevel = (int) substr($this->level, 6);
if ($intLevel < 1) {
$intLevel = 1;
}
if ($intLevel == 1):
$arrLanguages = \System::getLanguages();
foreach ($this->items as $item) {
if ($item['isActive'] || strpos($item['subitems'], 'class="active') !== false) {
$blnHasActive = true;
break;
}
}
?>
<select class="<?php echo $this->level; ?>" onchange="window.location.href=this.value">
<?php endif; ?>
<?php if ($intLevel == 1 && !$blnHasActive): ?><option value="">-</option><?php endif; ?>
<?php foreach ($this->items as $item): ?>
<?php if ($item['isActive']): ?>
<option class="active <?php echo $item['class']; ?>" selected><?php echo str_repeat(' ', $intLevel-1); ?><?php echo $arrLanguages[strtolower($item['link'])] ?: $item['link']; ?><?php echo $item['subitems']; ?></option>
<?php else: ?>
<option <?php if ($item['class']): ?> class="<?php echo $item['class']; ?>"<?php endif; ?> value="<?php echo \Environment::get('base').$item['href']; ?>"><?php echo str_repeat(' ', $intLevel-1); ?><?php echo $arrLanguages[strtolower($item['link'])] ?: $item['link']; ?><?php echo $item['subitems']; ?></option>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($intLevel == 1): ?>
</select>
<?php endif; ?>
Lesezeichen