Use custom icon in Pimcore menu item

29 views Asked by At

Can anyone suggest me how to use custom icons for a menu item in Pimcore 11? I am right now using the iconCls property in Ext js to load a available icon for a newly created menu item. Instead, I would like to use a custom icon, which can be loaded from a filepath.

I have tried using property icon instead of iconCls, but was not working.

1

There are 1 answers

0
Dinkheller On
  1. Add the font to the scss in ExtJS
@font-face {
  font-family: "ExtraIconFont";
  src: url('fonts/ExtraIconFont.eot');
  src: url('fonts/ExtraIconFont.ttf') format('truetype');
}
  1. Create a class which describes the font
.pimcore-extra-font {
    font-family: 'ExtraIconFont'
}
  1. Add the class to your component
{
    xtype: 'component',
    cls: 'pimcore-extra-font other-cls'
}