1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,55 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+/** |
|
4 |
+ * Pagelist for Contao |
|
5 |
+ * |
|
6 |
+ * Copyright (c) 2015 Benjamin Roth |
|
7 |
+ * |
|
8 |
+ * @license LGPL-3.0+ |
|
9 |
+ */ |
|
10 |
+ |
|
11 |
+/** |
|
12 |
+ * Palettes |
|
13 |
+ */ |
|
14 |
+$GLOBALS['TL_DCA']['tl_module']['palettes']['__selector__'][] = 'showTeaserImg'; |
|
15 |
+$GLOBALS['TL_DCA']['tl_module']['palettes']['pagelist'] = '{title_legend},name,headline,type;{config_legend},showProtected,showTeaserImg,perPage;{reference_legend},defineRoot;{template_legend:hide},customTpl,eSM_pagelist_template;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space'; |
|
16 |
+$GLOBALS['TL_DCA']['tl_module']['subpalettes']['showTeaserImg'] = 'imgSize'; |
|
17 |
+ |
|
18 |
+/** |
|
19 |
+ * Fields |
|
20 |
+ */ |
|
21 |
+$GLOBALS['TL_DCA']['tl_module']['fields']['showTeaserImg'] = array |
|
22 |
+( |
|
23 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_module']['showTeaserImg'], |
|
24 |
+ 'exclude' => true, |
|
25 |
+ 'inputType' => 'checkbox', |
|
26 |
+ 'eval' => array('tl_class'=>'w50', 'submitOnChange'=>true), |
|
27 |
+ 'sql' => "char(1) NOT NULL default ''" |
|
28 |
+); |
|
29 |
+ |
|
30 |
+$GLOBALS['TL_DCA']['tl_module']['fields']['eSM_pagelist_template'] = array |
|
31 |
+( |
|
32 |
+ 'label' => &$GLOBALS['TL_LANG']['tl_module']['eSM_pagelist_template'], |
|
33 |
+ 'exclude' => true, |
|
34 |
+ 'default' => 'espl_default', |
|
35 |
+ 'inputType' => 'select', |
|
36 |
+ 'options_callback' => array('tl_module_esm_pagelist', 'getPagelistTemplates'), |
|
37 |
+ 'eval' => array('tl_class'=>'w50'), |
|
38 |
+ 'sql' => "varchar(64) NOT NULL default ''" |
|
39 |
+); |
|
40 |
+ |
|
41 |
+/** |
|
42 |
+ * Class tl_module_esm_pagelist |
|
43 |
+ * Provide miscellaneous methods that are used by the data configuration array. |
|
44 |
+ */ |
|
45 |
+class tl_module_esm_pagelist extends Backend |
|
46 |
+{ |
|
47 |
+ /** |
|
48 |
+ * Return all clientsShowcase snippet templates as array |
|
49 |
+ * @return array |
|
50 |
+ */ |
|
51 |
+ public function getPagelistTemplates() |
|
52 |
+ { |
|
53 |
+ return $this->getTemplateGroup('espl_'); |
|
54 |
+ } |
|
55 |
+} |
|
0 | 56 |
\ No newline at end of file |