Custom module icon

Hi,

Been tinkering with a development of SuiteCRM on and off for several months which is the main has been quite successful.

Recently implemented a new custom module (Assets) which is linked M:1 to Accounts/Customers, however minor issue is that there is no icon appearing in the asset subpanel within accounts nor in the recently viewed sidebar which is what is bugging me the most…

I’ve used workflow to get the ‘name’ field to populate with a custom field but it just looks odd in the sidebar just showing the Asset#. I’ve located what I think are the related icons but they don’t seem to have any bearing whatever change I make.

I’ve checked permission and wizard shows all files writable. Run quick repair and rebuild countless times.

Currently running version 7.11.4

TIA

:slight_smile:

Hi, welcome.

Have a look at this thread:

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/19057-icons-for-custom-modules

especially this reply near the end:

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/19057-icons-for-custom-modules?start=15#85683

SuiteCRM is currently not handling custom module icons very well, but that CSS tweak is quite simple.

1 Like

Thanks i’ll take a look over the weekend!

So i’ve aded the following line to style.css

.suitepicon-module-asset_Assets:before{content:"\f1b8"}

Nothing else in the file, run qr&r but still missing icons.

I noted in the other thread module is PVR_Hobbie (use of underscore) then in the class pvr-hobbie. My module is named asset_Assets, i’ve tried variations usng - and _ plus i’ve also tried playing with the case but to no avail. Am I missing something?

TIA

Note I made changes to file in:

~/themes/SuiteP/css/Dawn/

Could not see same hierarchy under ‘custom’ directory…

When directories don’t exist under “custom” dir, you can (should) create them. When you put that under custom, instead of putting the entire file with the added line, you put just a small file with just that line, and it will get aggregated to the larger file in core.

You need to run QR & R and do a browser hard refresh to see changes.

About the CSS class you should use (.suitepicon-module-asset_Assets) you should get from your browser. Right-cick on the spot where the icon should be, but isn’t displaying, and that will contain the CSS class you need to set.

The \f1b8 is the code for the specific icon you’re choosing. See a list here https://salesagility.github.io/SuiteP-Icon-Font/index.html (the code you need is in the source of that page).

I copied the the SuiteP dir to custom/themes/SuiteP/css reset permissions and replaced the style.css file in each of the directories for Dawn, Day, Dusk & Night with a small file containing line:

.suitepicon-module-asset_Assets:before{content:"\f1b3"}

I’ve run quick repair and cleared browser cache and restarted server but still no icon showing, just to be clear where I think i should be seeing icons i’ve included screenshots of the side bar and the subpanel in the accounts module.

- sidebar

- subpanel

No, don’t copy the entire directory! :ohmy:

Just create the necessary directories so you can create the single file you need to customize:

create dir custom/themes/
create dir custom/themes/SuiteP/
create dir custom/themes/SuiteP/css
create dir custom/themes/SuiteP/css/Dawn

create file custom/themes/SuiteP/css/Dawn/style.css with just that single line

Did you check the CSS class name in the page source?

I’ve amended that and run quick repair but still noting.

class=​"recent-links-detail"

This drops down to show:

<span class=​"suitepicon suitepicon-module-asset-assets">​​

Updated style.css to class as shown above and icons now showing.

.suitepicon-module-asset-assets:before{content:"\f1b3"}

Thanks very much for your help!

1 Like

It’s not showing the icon I expected but an icon nonetheless :slight_smile:

I am glad you got it working. B-)

Did you check the icon list I linked above? You can choose from a bunch of other icons, I’m sure one of them will do.

Yes I selected code: f1b3 which should be template-company but it’s showing the module-process icon instead

I’ll check codes again…

@pgr

Is there an updated list of SuiteCRM icons?

The graphic display of icons is at
SuiteP Icons :: SuiteCRM Documentation (and the sub-pages to that)

and in theory, the code required (ie f17f) to get the icon you want can be seen by viewing the source code at
https://salesagility.github.io/SuiteP-Icon-Font/index.html

But the codes shown are out of date, as mentioned by @daleyw84 above and confirmed by my use this morning.

Is there an updated list of codes to match the icons?

Sorry, I never heard of any updated list…