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' => array
+
'eval'     => array
 +
(
 +
'style'=>'width:100%;',
 +
'columnFields' => array
 
(
 
(
'columnsData'=> array
+
'type' => array
(
+
(
'columns' => array
+
'label'                   => 'hallo',
(
+
'default'                => 'regular',
'key' => 'language',
+
'exclude'                => true,
'label' => $GLOBALS['TL_LANG']['tl_table']['mylanguagelabel'],
+
'inputType'              => 'select',
'source' => $this->getLanguages(),
+
'options_callback'        => array('tl_page', 'getPageTypes'),
'style' => 'width:200px',
+
'eval'                    => array('helpwizard'=>true, 'submitOnChange'=>true, 'tl_class'=>'w50'),
'inputType' => 'select',
+
'reference'               => &$GLOBALS['TL_LANG']['PTY']
'default' => 'de'
+
),
),
+
'minRange'    => array
array
+
(
(
+
'label' => &$GLOBALS['TL_LANG']['tl_module']['catalog_staticranges_items_minrange'],
'key' => 'translation',
+
'inputType' => 'text',
'label' => $GLOBALS['TL_LANG']['tl_table']['mytranslationlabel'],
+
'eval'      => array()
'inputType' => 'text',
+
),
'style' => 'width:300px'
+
'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.

Aussehen

Das Modul ist eine Mischung aus dem MultiTextWizard und dem MultiSelectWizard.

MultiColumnWizard

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.

Ansichten
Meine Werkzeuge

Contao Community Documentation

God: "what is your job?"
me: "i am a software developer ... i develop websites with Contao 3"
God: "sounds cool, what are you working on today? Web sockets? Ajax? HTML5 video streaming?"
me: "no, i am trying to send an email ...."

Leo Unglaub
In anderen Sprachen
Navigation
Verstehen
Verwenden
Entwickeln
Verschiedenes
Werkzeuge