peted
19 November 2020 16:18
#1
IS there away to add a link to the menu menu for a custom entry point?
I can customize the quick create menu, but I need a link to an entry point in a specific place.
I have only used the " MODULE MENU FILTERS" option to change these menus in the past.
Any help would be greatly appreciated.
@peted
You should modify into the file - include/EditView/SubpanelQuickCreate.php the line:
$this->ev->defs['templateMeta']['form']['buttons'] = array('SUBPANELSAVE', 'SUBPANELCANCEL', 'SUBPANELFULLFORM');
peted
19 November 2020 20:59
#3
Thanks for the reply, but i donât think i explained it well. I am after adding links into this menu.
Check here for some ideas:
Hi,
I created a custom module to be used on the back end only. I didnât want it available for menus or panels so I hide it. To achieve that I
modify, custom/Extension/application/Ext/Include/MyCustomModule.php and modify from:
<?php
$beanList['MyCustomModule'] = 'MyCustomModule';
$beanFiles['htgi3_MultipleActivities'] = 'modules/MyCustomModule/MyCustomModule.php';
$moduleList[] = 'MyCustomModule';
?>
To this:
<?php
$beanList['MyCustomModule'] = 'MyCustomModule';
$beanFiles['MyCustomModâŚ
Thanks,
BrozTechnologies
@peted
OK.
Itâs module list only. You can make special module only. Another way you can change function âdisplayHeaderâ of system file:
include/MVC/View/SugarView.php. look at line numbers from 734 to 780.
@peted
The third way to write javascript and load it using logichook - âafter_ui_footerâ.
pgr
20 November 2020 10:56
#7
There is a âproperâ way to do this
Introduction The extension framework provides a means to modify various application data inside SuiteCRM. For example it provides a way to add or modify vardefs, scheduled tasks, language strings and more.
The mechanism is slightly more complicated...
The âMenuâ extensions are just for this purpose.
If youâre having trouble getting it to work, have a look at the function that loads these items: https://github.com/salesagility/SuiteCRM/blob/master/include/MVC/View/SugarView.php#L1381
@pgr
Yes. Itâs another menu. Itâs menu of the module. But he want make the item in main menu.
pgr
20 November 2020 17:42
#9
@p.konetskiy Youâre right.
@peted Then I suggest a custom _headerModuleList.tpl
Copy themes/SuiteP/tpls/_headerModuleList.tpl
Into custom/themes/SuiteP/tpls/_headerModuleList.tpl
in the new file, between these two lines
add something like this:
{if $group == "Support"}<li><a href="https://docs.suitecrm.com">Docs!</a></li>{/if}
Instead of âSupportâ, use whatever top menu you wish to add to.
Note that a separate entry is likely necessary for the mobile menu, when the screen width is lower everything changes (search for it in the same file).
1 Like
peted
24 November 2020 10:51
#10
Thanks for this, I have had a quick play and i can get what i need on the top menu. @pgr thanks for your suggestion about module menu, This would prove useful for other modules. However i canât get it working for custom entry points.
My menu.ext.php contains this:
$module_menu = array();
$module_menu[] = array('index.php?entryPoint=PurchasingTable', 'Purchase Table', 'import', null);
however when it is clicked the URL it directs to is: /index.php?action=ajaxui#ajaxUILoc=index.php%3FentryPoint%3DPurchasingTable
and it opens up the entry point in a error window.
Any Suggestions?
@peted
Do 2 steps:
change your call
from
index.php?entryPoint=PurchasingTable
to
index.php?entryPoint=PurchasingTable&module=NoAjaxUse
âNoAjaxUseâ can be any name.
2. add line to file - config_override.php:
$sugar_config['addAjaxBannedModules'] = array('NoAjaxUse');
1 Like