MultiColumnWizard: Unterschied zwischen den Versionen
Aus Contao Community Documentation
K (Typos) |
|||
Zeile 22: | Zeile 22: | ||
<source lang="php"> | <source lang="php"> | ||
− | $GLOBALS['TL_DCA'][' | + | $GLOBALS['TL_DCA']['tl_theme']['fields']['templateSelection'] = array |
( | ( | ||
− | 'label' | + | 'label' => &$GLOBALS['TL_LANG']['tl_theme']['templateSelection'], |
− | 'exclude' | + | 'exclude' => true, |
− | 'inputType' | + | 'inputType' => 'multiColumnWizard', |
− | 'eval' | + | 'eval' => array |
( | ( | ||
− | |||
'columnFields' => array | 'columnFields' => array | ||
( | ( | ||
− | ' | + | 'ts_client_os' => array |
( | ( | ||
− | 'label' | + | 'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_os'], |
− | + | 'exclude' => true, | |
− | 'exclude' | + | 'inputType' => 'select', |
− | 'inputType' | + | 'options' => array |
− | ' | + | ( |
− | 'eval' | + | 'option1' => 'Option 1', |
− | + | 'option2' => 'Option 2', | |
+ | ), | ||
+ | 'eval' => array('style' => 'width:250px', 'includeBlankOption'=>true) | ||
), | ), | ||
− | ' | + | 'ts_client_browser' => array |
( | ( | ||
− | 'label' => &$GLOBALS['TL_LANG'][' | + | 'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_browser'], |
− | 'inputType' => 'text', | + | 'exclude' => true, |
− | 'eval' | + | 'inputType' => 'text', |
+ | 'eval' => array('style'=>'width:180px') | ||
), | ), | ||
− | ' | + | 'ts_client_mobile' => array |
( | ( | ||
− | 'label' => &$GLOBALS['TL_LANG'][' | + | 'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_mobile'], |
− | 'inputType' => ' | + | 'exclude' => true, |
− | 'eval' | + | 'inputType' => 'checkbox', |
− | ) | + | 'eval' => array('style'=>'width:40px') |
− | ' | + | |
+ | ), | ||
+ | 'ts_extension' => array | ||
( | ( | ||
− | 'label' => &$GLOBALS['TL_LANG'][' | + | 'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_extension'], |
− | 'inputType' => ' | + | 'inputType' => 'text', |
− | ' | + | 'eval' => array('mandatory'=>true, 'style'=>'width:115px') |
− | + | ), | |
− | ) | + | |
) | ) | ||
) | ) | ||
Zeile 70: | Zeile 73: | ||
$GLOBALS['TL_DCA']['tl_table']['fields']['anything'] = array | $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')) | |
); | ); |
Version vom 27. August 2011, 09:42 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, beliebige Widget-Typen nebeneinander zu platzieren.
Das Widget ist eigentlich das Gleiche wie der MultiTextWizard oder der MultiSelectWizard; es erweitert die Funktionalitäten für belibige Widgets.
Inhaltsverzeichnis
[Verbergen]Aussehen
Das Modul ist eine Erweiterung des MultiTextWizard und des MultiSelectWizard.
Verwendung
Es gibt zwei Verwendungsmöglichkeiten. Entweder direkt mit der Angabe von "columnFields" im "eval"-Array oder mit einem Callback.
Angabe mit columnFields
$GLOBALS['TL_DCA']['tl_theme']['fields']['templateSelection'] = array ( 'label' => &$GLOBALS['TL_LANG']['tl_theme']['templateSelection'], 'exclude' => true, 'inputType' => 'multiColumnWizard', 'eval' => array ( 'columnFields' => array ( 'ts_client_os' => array ( 'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_os'], 'exclude' => true, 'inputType' => 'select', 'options' => array ( 'option1' => 'Option 1', 'option2' => 'Option 2', ), 'eval' => array('style' => 'width:250px', 'includeBlankOption'=>true) ), 'ts_client_browser' => array ( 'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_browser'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('style'=>'width:180px') ), 'ts_client_mobile' => array ( 'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_client_mobile'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('style'=>'width:40px') ), 'ts_extension' => array ( 'label' => &$GLOBALS['TL_LANG']['tl_theme']['ts_extension'], 'inputType' => 'text', 'eval' => array('mandatory'=>true, 'style'=>'width:115px') ), ) ) );
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 "columnFields"-Variante.