Halllo,
ich möchte in einem eigenen Bundle die Module-Palette im Backend von Contao erweitern. Das Modul ist über sie service.yml ergänzt:
PHP-Code:
# MyApp/src/Resources/config/service.yml
services:
MyApp\ContaoNewsstreamBundle\Controller\FrontendModule\NewsstreamModuleController:
tags:
- { name: contao.frontend_module, category: MyApp , template: mod_newsstream, type: newsstream }
public: true
Im Verzeichnis contao/dca ist die tl_module angelegt mit den Erweiterungen für die Paletten
PHP-Code:
# MyApp/src/Resources/contao/dca/tl_modules.php
...
/**
* Add palettes to tl_module
*/
$GLOBALS['TL_DCA']['tl_module']['palettes']['newsstream'] = '{title_legend}name,type,newsstream_list_page,newsstreamtemplate,cssID;';
/**
* Add fields to tl_module
*/
$GLOBALS['TL_DCA']['tl_module']['fields']['newsstreamtemplate'] = array(
'label' => &$GLOBALS['TL_LANG']['tl_module']['newsstreamtemplate'],
'default' => 'newsstream',
'exclude' => true,
'inputType' => 'select',
'eval' => [
'mandatory' => false,
'tl_class' => 'clr m12'
],
'options_callback' => array('tl_newsstream_templ', 'getNewsreaderTemplates'),
'sql' => "varchar(255) NOT NULL default ''"
);
$GLOBALS['TL_DCA']['tl_module']['fields']['newsstream_list_page'] = [
'label' => &$GLOBALS['TL_LANG']['tl_module']['newsstream_list_page'],
'exclude' => true,
'inputType' => 'pageTree',
'eval' => array (
'mandatory' => true,
'fieldType' => 'radio',
'doNotCopy' => true,
'tl_class' => 'clr w50'
),
'sql' => "int(10) NULL"
];
...
In der Moduleauswahl wird mein Module in der Modultyp Liste angezeigt. Wenn ich es auswähle wird die Ansicht nicht aktualisiert und meine Palettenerweiterung nicht angezeigt.
Wo ist hier mein Fehler? Was muss ich noch tun, damit auch das Installtool meine Erweiterungen erkennt?
Danke Gruß aus Köln
Mike
Edit: erledigt!
Insert:
PHP-Code:
# MyApp/src/ContaoManager/Plugin.php
...
use Contao\CoreBundle\ContaoCoreBundle;
...
Wer sucht findet auch
Lesezeichen