Documentation

Icon libraries

Attention! We strongly recommend first to learn more about Sites module REST documentation to understand how the module functions (with REST available in Bitrix24 Self-hosted editions). View this documentation as useful source when working with Bitrix24 Self-hosted editions and find out more details about API and only REST is not enough.

Icon selector can sel ect icon node types fr om the existing icons list. Bitrix24 On-premise has an option to both delete some libraries, as well as to add new ones.

Standard installation has the following icon libraries (system classes that may be useful are shown in brackets below):

    Fontawesome (BX.Landing.Icon.FontAwesome)
    HS Icons (BX.Landing.Icon.HSIcons)
    Simple Line Icons (BX.Landing.Icon.SimpleLine)
    Simple Line Icon Pro 1 (BX.Landing.Icon.SimpleLineProOne)
    Simple Line Icon Pro 2 (BX.Landing.Icon.SimpleLineProTwo)
    100 Line Icons (BX.Landing.Icon.EtLineIcons)

Your own libraries can be registered as follows:

var customLibrary = {
   id: 'my-library',
   name: 'My Library',
   categories: [
      {
         id: 'my-category-id',
         name: 'My Category Name',
         items: [
            'icon-class-name-1',
            'icon-class-name-2',
            ...
         ]
      }
   ]
};
BX.Landing.UI.Panel.Icon.getInstance().libraries.push(customLibrary);

As you can see, items parameter just lists the library icon classes. This JS code and CSS library must be located at the editor initiation page. Public section must have only CSS library. For example, such code can be connected via library.

The same approach is used to modify system set of icons and leave only the icons you require. The helpful classes listed above are:

BX.Landing.UI.Panel.Icon.getInstance().libraries = [];//Delete all preconfigured libraries
BX.Landing.UI.Panel.Icon.getInstance().libraries.push(BX.Landing.Icon.SimpleLineProTwo)
BX.Landing.UI.Panel.Icon.getInstance().libraries.push(BX.Landing.Icon.EtLineIcons)


© «Bitrix24», 2001-2024
Up