COREmanager Documentation

External function (extaction)

extaction is a mechanism enabling to add external links to the main menu. In COREmanager configuration file you can specify a URL for a specific function name. The URL will be used for generating a link in the main menu if the function with that name is not registered in the panel.

The following macros can be used in URL:

$sitename of the site that received this request (without port number)$managerURL to a control panel that received the request

Example

We want to BILLmanager an external link to ya.ru.

Create the file with fucntion description:

#cat /usr/local/mgr5/etc/xml/billmgr_mod_menu.xml 
<?xml version="1.0" encoding="UTF-8"?>
<mgrdata>
<mainmenu level="admin+">
<node name="mainmenuaccount">
<node name="myfunc" />
</node>
</mainmenu>
<handler name="myaddon" type="xml">
<func name="myfunc" />
</handler>
<lang name="ru">
<messages name="desktop">
<msg name="menu_myfunc">Yandex</msg>
</messages>
</lang>
</mgrdata>


Notes:

<node name="account"> - this module will be added into the "Account" section.

<node name="myfunc" /> - custom function. To make the control panel display the new menu module, make sure to specify the same function name in the panel.

Create an add-on to add the function:

<handler name="myaddon" type="xml">
<func name="myfunc" />
</handler>

Into the BILLmanager configuration file (/usr/local/mgr5/etc/billmgr.conf) add a link to the menu module described above:

extaction myfunc http://ya.ru|http://ya.ru