Icon for the Administration and Help menu

I want to assign some icons to the Administration and Help menu, but these are not left editable, is there any way? Or should you overwrite these options?

Hi Nelson,

There are two ways to set icons to Administrative and Help menu items:

  1. Create your own web-menu.xml config, adjust icons there and specify it without “+” in the cuba.menuConfig property (web-app.properties):

cuba.menuConfig = com/iis/izzy/web-menu.xml
  1. Or you can add icons programmatically in the controller of extended mainWindow:

public class ExtAppMainWindow extends AbstractMainWindow {
    @Inject
    private FtsField ftsField;

    @Inject
private SideMenu sideMenu;

    @Override
    public void init(Map<String, Object> params) {
        super.init(params);
        initFtsField(ftsField);
        sideMenu.getMenuItem("administration").setIcon("branding/app-icon-login.png");
        sideMenu.getMenuItem("help").setIcon("branding/app-icon-menu.png");
    }
}
1 Like