# Replace menu labels by icons in new menu

**URL:** <https://community.open-emr.org/t/replace-menu-labels-by-icons-in-new-menu/8074>\
**Category:** OpenEMR Development\
**Created:** [October 14, 2016, 12:43am UTC](https://community.open-emr.org/t/replace-menu-labels-by-icons-in-new-menu/8074 "2016-10-14T00:43:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [October 14, 2016, 12:43am UTC](https://community.open-emr.org/t/replace-menu-labels-by-icons-in-new-menu/8074/1 "2016-10-14T00:43:21Z")

</div>

**[mdsupport](https://sourceforge.net/u/mdsupport/)** wrote on [Friday, October 14, 2016](https://sourceforge.net/p/openemr/discussion/202506/thread/19e9e705/#56f8):

In case anyone is interested in local changes to the standard new menu, here are few lines to decrease horizontal space needed by new menu :

Make sure font-awesome css is in the DOM and invoke after all standard code.

```auto
// Replace menu text by fa
var xl_icons = {
    "Calendar": "calendar",
    "Flow Board": "calendar-check-o",
    "Messages": "envelope",
// "Fees": "money",
// "Administration": "cog",
// "Reports": "file-text-o",
    "About": "ellipsis-v",
};

$(".menuLabel").each( function(ix) {
    var lbl = $(this).html().trim();
    if (xl_icons[lbl]) {
       $(this).css ('font-size', '150%');
       $(this).attr ('title', lbl);
       $(this).html('<i class="fa fa-' + xl_icons[lbl] + '" aria-hidden="true"></i>');
   } 
});

```

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [October 14, 2016, 1:02am UTC](https://community.open-emr.org/t/replace-menu-labels-by-icons-in-new-menu/8074/2 "2016-10-14T01:02:03Z")

</div>

**[bradymiller](https://sourceforge.net/u/bradymiller/)** wrote on [Friday, October 14, 2016](https://sourceforge.net/p/openemr/discussion/202506/thread/19e9e705/#c768):

Hi MD Support,

Can you throw this code into a PR on github? This is a very good starting point to begin to think about supporting this in the main codebase. Initial thoughts are to place a label\_to\_icon setting in the json menu structure, which it will then use if the user wants this option via a global for now (and in future can figure out a way to be responsive). And thinking should only be used on the top menu items??

-brady  
[OpenEMR](http://www.open-emr.org/)

---

<div class="post-metadata">

**Author:** ![system](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/2X/b/bb9e4e8ae2ea7faac2e952fd9e38a3ce03aac403.png) [@system](https://community.open-emr.org/u/system)\
**Post date:** [October 14, 2016, 3:08am UTC](https://community.open-emr.org/t/replace-menu-labels-by-icons-in-new-menu/8074/3 "2016-10-14T03:08:04Z")

</div>

**[mdsupport](https://sourceforge.net/u/mdsupport/)** wrote on [Friday, October 14, 2016](https://sourceforge.net/p/openemr/discussion/202506/thread/19e9e705/#5ccc):

Added [this](https://github.com/openemr/openemr/issues/316).
