MultiColumnWizard: Unterschied zwischen den Versionen
Aus Contao Community Documentation
(→Angabe mit columnsData) |
|||
Zeile 27: | Zeile 27: | ||
'exclude' => true, | 'exclude' => true, | ||
'inputType' => 'multiColumnWizard', | 'inputType' => 'multiColumnWizard', | ||
− | 'eval' | + | 'eval' => array |
+ | ( | ||
+ | 'style'=>'width:100%;', | ||
+ | 'columnFields' => array | ||
( | ( | ||
− | ' | + | 'type' => array |
− | + | ( | |
− | + | 'label' => 'hallo', | |
− | + | 'default' => 'regular', | |
− | + | 'exclude' => true, | |
− | + | 'inputType' => 'select', | |
− | + | 'options_callback' => array('tl_page', 'getPageTypes'), | |
− | + | 'eval' => array('helpwizard'=>true, 'submitOnChange'=>true, 'tl_class'=>'w50'), | |
− | + | 'reference' => &$GLOBALS['TL_LANG']['PTY'] | |
− | + | ), | |
− | + | 'minRange' => array | |
− | + | ( | |
− | + | 'label' => &$GLOBALS['TL_LANG']['tl_module']['catalog_staticranges_items_minrange'], | |
− | + | 'inputType' => 'text', | |
− | + | 'eval' => array() | |
− | + | ), | |
− | + | 'textnachricht' => array | |
− | + | ( | |
− | + | 'label' => &$GLOBALS['TL_LANG']['tl_module']['catalog_staticranges_items_maxrange'], | |
+ | 'inputType' => 'textarea', | ||
+ | 'eval' => array('cols'=>25,'rows'=>2) | ||
+ | ) , | ||
+ | 'checkboxen' => array | ||
+ | ( | ||
+ | 'label' => &$GLOBALS['TL_LANG']['tl_module']['catalog_staticranges_items_maxrange'], | ||
+ | 'inputType' => 'checkbox', | ||
+ | 'options' => array("Info","Nachricht","Sonstiges"), | ||
+ | 'eval' => array('multiple'=>true) | ||
+ | ) | ||
) | ) | ||
+ | ) | ||
); | ); | ||
</source> | </source> |
Version vom 4. August 2011, 16:54 Uhr
Erweiterungs-Übersicht | |
---|---|
Entwickler Webseite | http://www.men-at-work.de |
Version der Erweiterung | 1.0.0 |
Kompatibilität mit Contao Version | 2.9 - 2.9.5 |
Link zum Extension Repository | http://www.contao.org/erweiterungsliste/view/MultiColumnWizard.html |
Link zum Tracker | http://contao-forge.de/projects/multicolumnwizard/issues |
Dieses Widget ist dafür gedacht, Select- und Textfelder nebeneinander zu platzieren.
Das Widget ist eigentlich das gleiche wie der MultiTextWizard und MultiSelectWizard, er verbindet beide Funktionalitäten zu einem Widget.
Inhaltsverzeichnis
[Verbergen]Aussehen
Das Modul ist eine Mischung aus dem MultiTextWizard und dem MultiSelectWizard.
Verwendung
Es gibt zwei Verwendungsmöglichkeiten. Entweder direkt mit der Angabe von "columnsData" im "eval"-Array oder mit einem Callback.
Angabe mit columnsData
$GLOBALS['TL_DCA']['tl_table']['fields']['anything'] = array ( 'label' => $GLOBALS['TL_LANG']['tl_table']['anything'], 'exclude' => true, 'inputType' => 'multiColumnWizard', 'eval' => array ( 'style'=>'width:100%;', 'columnFields' => array ( 'type' => array ( 'label' => 'hallo', 'default' => 'regular', 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('tl_page', 'getPageTypes'), 'eval' => array('helpwizard'=>true, 'submitOnChange'=>true, 'tl_class'=>'w50'), 'reference' => &$GLOBALS['TL_LANG']['PTY'] ), 'minRange' => array ( 'label' => &$GLOBALS['TL_LANG']['tl_module']['catalog_staticranges_items_minrange'], 'inputType' => 'text', 'eval' => array() ), 'textnachricht' => array ( 'label' => &$GLOBALS['TL_LANG']['tl_module']['catalog_staticranges_items_maxrange'], 'inputType' => 'textarea', 'eval' => array('cols'=>25,'rows'=>2) ) , 'checkboxen' => array ( 'label' => &$GLOBALS['TL_LANG']['tl_module']['catalog_staticranges_items_maxrange'], 'inputType' => 'checkbox', 'options' => array("Info","Nachricht","Sonstiges"), 'eval' => array('multiple'=>true) ) ) ) );
Angabe mit Callback
$GLOBALS['TL_DCA']['tl_table']['fields']['anything'] = array ( 'label' => &$GLOBALS['TL_LANG']['tl_table']['anything'], 'exclude' => true, 'inputType' => 'multiColumnWizard', 'eval' => array('mandatory'=>true,'columnsCallback'=>array('Class', 'Method')) );
Wobei natürlich der Return-Wert genau das selbe Array sein muss, wie bei der "columnsData"-Variante.