Ispmanager 6 lite, pro, host documentation

/
/
/
Plug-in example. How to add icons to custom menu items

Plug-in example. How to add icons to custom menu items

This article describes how to add an icon to custom menu items. If the user has not added custom menu items, see the documentation.

It is not possible to customize icons for submenu items.

Follow the steps below:

  1.   Open the Main menu → File manager
  2.   Navigate to /usr/local/mgr5/skins folder
  It is recommended to create a subfolder. In our example /usr/local/mgr5/skins/icons subfolder will be used.

  

3. Open the current folder (/usr/local/mgr5/skins/icons).

4. Click the Upload button. Upload the required images.

Image requirements information
  • images must be in SVG format. A transparent background is required;
  • if the background is not transparent, the image will be set to a single color corresponding to the default icon color;
  • svg files with animation are not supported, the icon will be static;
  • icons should be 15x15 pixels in size.

5. Choose a convenient format and click the Upload button.

Example of properly uploaded images:

6. Upload the images you need.

7. Open the ispmgr_mod_menu.xml file. If it has not been created before, see the instruction.

8. Click Open.

9. Enter the data in the following format:

<node name="testmenuitem" customicon="/manimg/icons/googlechrome.svg" />
  • node name - the name of the menu item for which you want to change the icon.
  • "/manimg/icons/googlechrome.svg" /> - path to the image.
The path in the file system /usr/local/mgr5/skins corresponds to the path https://hostname:port_number/manimg. The /skins directory is converted to the /manimg directory.

Example of a correctly edited string:

   

The menu item icon will be changed.