PHP-Code:
<?php
return array(
'label' => array(
'de' => array(
'KOPFNUSS - Seitenteaser Bild links oder rechts',
'Ein Element zur Vorschau von Seiten',
),
'en' => array(
'KOPFNUSS - Page teaser image left or right',
'',
),
),
'types' => array('content'),
'contentCategory' => 'texts',
'standardFields' => array('cssID'),
'fields' => array(
'pages' => array(
'label' => array(
'de' => array(
'Seite',
'Fügen Sie eine Seitenvorschau hinzu.',
),
'en' => array(
'Site',
'Add a page preview.',
),
),
'elementLabel' => array(
'de' => 'Seite %s',
'en' => 'Page %s',
),
'inputType' => 'list',
'minItems' => 1,
'maxItems' => 1,
'fields' => array(
'description1' => array(
'label' => array('Einstellungen', 'Wählen Sie die passenden Einstellungen aus'),
'inputType' => 'group',
),
'hasIconOverImage' => array(
'label' => array(
'de' => array('Ist über dem Bild ein Icon?', ''),
'en' => array('Is over the image a icon?', ''),
),
'inputType' => 'checkbox',
'options' => array(
'hasIconOverImage' => 'Über dem Bild ist ein Icon',
),
'eval' => array('multiple' => true, 'tl_class' => 'w50 clr cbx widget',),
),
.
.
.
'description3' => array(
'label' => array('Icon als Overlay', ''),
'inputType' => 'group',
'dependsOn' => array(
'field' => 'hasIconOverImage', // Name des Feldes das geprüft werden soll
'value' => 'hasIconOverImage', // Der Wert der mit dem Feldwert übereinstimmen muss
),
),
'iconTyp' => array(
'label' => array(
'de' => array('Icontyp', ''),
'en' => array('Icon typ', ''),
),
'inputType' => 'select',
'options' => array(
'isInternSvg' => 'SVG intern',
'isIconExtern' => 'Bild als Datei',
),
'eval' => array('mandatory'=>true, 'tl_class' => 'w50 widget',),
),
'iconInternSvg' => array(
'label' => array(
'de' => array('Icon SVG', 'Füge über Contao Inserttag eine svg hinzu "{{file::datei.svg}}"'),
'en' => array('Icon SVG', ''),
),
'inputType' => 'textarea',
'eval' => array('mandatory'=>true, 'allowHtml'=>true, 'tl_class' => 'w50 clr widget',),
'dependsOn' => array(
'field' => 'iconTyp', // Name des Feldes das geprüft werden soll
'value' => 'isInternSvg', // Der Wert der mit dem Feldwert übereinstimmen muss
),
),
'iconExtern' => array(
'label' => array(
'de' => array('Icon Bild', ''),
'en' => array('Icon image', ''),
),
'inputType' => 'fileTree',
'eval' => array(
'fieldType' => 'radio',
'filesOnly' => true,
'extensions' => 'jpg,jpeg,png,svg',
'mandatory' => true,
'tl_class' => 'w50 clr widget',
),
'dependsOn' => array(
'field' => 'iconTyp', // Name des Feldes das geprüft werden soll
'value' => 'isIconExtern', // Der Wert der mit dem Feldwert übereinstimmen muss
),
),
.
.
.
),
),
),
);
Wenn ich mandatory von dem Feld entferne, kann ich speichern.
Lesezeichen