SugarIcons and FontAwesome in the same definition

Is it possible to have definitions for both SugarIcons and FontAwesome icons at the same time? For example in the menu bar for a module; we would like the sugaricons to appear for newer versions and font awesome to appear for older versions. Can we define in such a way that either will work? We have Module Loadable Packages that need to work with both older and newer versions of Sugar. 

   array(
        'route' => "#$moduleName/create",
        'label' => 'LNK_NEW_RECORD',
        'acl_action' => 'create',
        'acl_module' => $moduleName,
        'icon' => 'fa-plus',
    ),

   array(
        'route' => "#$moduleName/create",
        'label' => 'LNK_NEW_RECORD',
        'acl_action' => 'create',
        'acl_module' => $moduleName,
        'icon' => 'sicon-plus',
    ),

Parents Reply
  • Hey 

    I use this in our add-ons to adjust the links in the new admin-page menu :

    global $sugar_config;
    if (!empty($sugar_config['sugar_version'])
        && version_compare($sugar_config['sugar_version'], '11.3.0', '<')
    ) {

    ....

    The file is located in
    custom/Extension/modules/Administration/Ext/Administration/

    Hopefully it might help pending an official answer, but could quickly become tiresome if you need to change many viewdefs from the Extension directories.

    Best Regards,
    Laurent

    PS : an other way to do it would be to prepare both versions of the file and delete the 'wrong" one from the manifest array in the pre-install package, so that only the adequate version install.

Children
No Data