This is my first module an i found something strange.
I create a module and named it "foo", and created "tl_news.php" under the "dca" folder and added these lines:
Code:
/**
* Change tl_news palettes
*/
$GLOBALS['TL_DCA']['tl_news']['palettes']['default'] = str_replace("author", "author,foo", $GLOBALS['TL_DCA']['tl_news']['palettes']['default']);
$GLOBALS['TL_DCA']['tl_news']['fields']['foo'] = array
(
'label' => &$GLOBALS['TL_LANG']['MSC']['foo'],
'inputType' => 'select',
'foreignKey' => 'tl_foo.name',
'sorting' => true,
'eval' => array('tl_class'=>'long')
);
but there was no change in the News palette :?
Finally I found that the problem caused by the order that the modules are loading. cause my module starts with "F" and will be called before News module with "N" and therefore the array i defined will be overridden by News module.
But when i change my module name to "XFOO", everything will be ok.
it was kinda weird for me, so i though maybe i'm missing something. I'll be glad if you have any comment on this issue.
Bookmarks