Hallo liebe Community,
ich habe ein Custom Element mit einem Select Feld, welches mit Daten aus einer Catalog Tabelle gefüllt wird:
Code:
'category' => array (
'label' => array ('Kategorie', 'Wählen Sie als erstes eine Kategorie.'),
'inputType' => 'select',
'eval' => array('tl_class' => 'w50', 'submitOnChange'=>true),
'options_callback' => function () {
$options = array();
$categorydata = \Database::getInstance()->execute("SELECT title, output_name FROM ctlg_product_categories ORDER BY title");
while ($categorydata->next())
{
$options[$categorydata->title] = $categorydata->output_name;
}
return $options;
}
),
Das funktioniert soweit auch wie gewünscht.
Allerdings wird bei der Frontend Ausgabe mit $this-category nur der Value ($categorydata->title) ausgegeben.
Ich möchte aber im Frontend den Wert $categorydata->output_name ausgeben.
Hat jemand von euch einen Tipp für mich?
Viele Grüße
Dirk
Lesezeichen