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',
    ),

  • Hi Jeff,

    As of now yes, we're still loading FontAwesome icons as part of our "deprecation policy", however it will be gone soon.

    You don't need any specific configuration for this to happen.

    If you're updating an icon in metadata, they should just need to have the icon name, ex fa-cog or sicon-settings and it’ll render properly. If this is being added to a template, they can follow normal procedure of fa fa-cog or sicon sicon-settings.

    Again, keep in mind that FA will be gone soon.

    rafa

    SugarCRM | Principal Developer Advocate

  • Hi ,

    Are there plans to expand the SugarIcon library before removing FontAwesome? Having a robust icon library is helpful for building integrations and plug-ins with an easily identifiable user experience. The SugarIcon library, when compared to FontAwesome, is missing icons including standard functionality (e.g. sign-in), common social media platforms (e.g. LinkedIn), and more general business applications (e.g. airplane for travel/expense, laptop for IT, gavel for legal, etc.). 

  • HI ,

    I may have misinterpreted 's question but I think he means he is looking for a way to code in both sets of icons so that his custom packages can be used by customers on old versions of Sugar with only the fa-icons as well as customers with newer versions that will have only the sugar-icons, and in both cases the code should display the icon appropriately.

    FrancescaS

  • as noted. I need one set of code that will work with both on-premise instances of Sugar and On-Demand instances. On-Premise customers have FA and will most likely for the next 10 years. How do I add code to handle both situations? Having 2 sets of code is very difficult to manage. We are already running into this for Sugar 11.2.0 Sugar Cloud and Sugar 9 on-premise. 

  • Hi everyone,

    Took me a bit longer to get all the answers I needed to reply it back to you on this matter.

    - To reiterate, SugarIcon is our standard icon library going forward and we expect to expand the number of available icons over time.
    - FontAwesome is deprecated and we plan to remove it as per earlier announcement
    - Here are some alternative paths to explore:
    - You can include FontAwesome in your MLPs as you would with any other code library that isn't part of Sugar core.
    - During a previous FontAwesome upgrade from v3 to v4, we created an open source "Compatibility MLP package" that could be installed to add back v3 icon support for instances that needed that. We're currently exploring doing something similar for this icon library upgrade. : (sugarclub.sugarcrm.com/.../font-awesome-3-2-1-compatibility-package-for-sugar-7-6)

    SugarCRM | Principal Developer Advocate