Hi,
I have a ModelAdmin where I need to change the name that appears in CMSMenu, but I cannot just change the...
static $menu_title = 'MyAdminOldName';
...I NEED to find a way of doing it outside of just changing the original static declaration.
I have tried and failed with...
inside a custom leftandmain decorator (does nothing)...
$menu_item = CMSMenu::get_menu_item('MyModelAdmin');//does return the right CMSMenuItem
CMSMenu::replace_menu_item('MyModelAdmin','NewName',$menu_item->url,$menu_item->controller,$menu_item->priority);
inside the init function of the extended ModelAdmin (does nothing)...
public function init()
{
$this->set_stat('menu_title','NewName');
}
in _config.php (complains about trying to use a database object before the database has been initialised)...
MyModelAdmin::set_stat('menu_title','NewName');
Any ideas?