added the option to remove or add a custom prefix to the Joomla admin menu name of your component @cpaschen

This commit is contained in:
2018-05-03 02:26:52 +02:00
parent f200e635b8
commit 8b8b42ae8f
8 changed files with 67 additions and 19 deletions

View File

@ -5780,7 +5780,7 @@ class Interpretation extends Fields
}
else
{
$titleData = array("''"); // just incase some mad man does not set a title/customAlias (we fall back on the date)
$titleData = array("'-'"); // just incase some mad man does not set a title/customAlias (we fall back on the date)
}
// rest the new function
$newFunction = array();
@ -12786,7 +12786,16 @@ class Interpretation extends Fields
// set the code name
$codeName = ComponentbuilderHelper::safeString($this->componentData->name_code);
// set main menu name to lang
$this->langContent['adminsys'][$lang] = '» ' . $this->componentData->name;
$addPrefix = $this->params->get('add_menu_prefix', 1);
if ($addPrefix == 1)
{
$prefix = trim($this->params->get('menu_prefix', '»'));
$this->langContent['adminsys'][$lang] = $prefix . ' ' . $this->componentData->name;
}
else
{
$this->langContent['adminsys'][$lang] = $this->componentData->name;
}
foreach ($this->componentData->admin_views as $view)
{
// set custom menu