Hallo zusammen,
ich habe in einem Custom Element ein Feld vom Typ "options" definiert. Dessen value kann ich auch ganz toll ausgeben.
PHP-Code:
'color' => array(
'label' => array(
'de' => array('Farbgebung der Box', 'Die Auswahl bezieht sich auf die Hintergrundfarbe der Box, Schriftfarben werden automatisch angepasst'),
'en' => array('Color of the box', 'Selection is realted to the background color of the box. Font color will be adjusted automatically'),
),
'inputType' => 'select',
'options' => array(
'black' => 'Schwarz',
'purple' => 'Lila',
'red' => 'Rot',
'silver' => 'Silber',
),
'eval' => array('tl_class' => 'w50'),
),
HTML-Code:
<?php echo $this->color; ?>
Nun möchte ich aber nicht den Value des Feldes ("red"), sondern auch das dazugehörige Label ("Rot") ausgeben.
Wie geht das? Ich scheitere leider. Ein shopTemplateVars hat leider auch keine Erleuchtung gebracht.
Tausend Dank im Voraus,
Philipp
Lesezeichen