Icons for custom modules

Thank you it works great, the only thing is that when I go to the https://salesagility.github.io/SuiteP-Icon-Font/index.html and look at the content codes they do not seem to match any longer. For example exploding icon (used for leads) is ā€œ\f1a0ā€ on that page, but when I look at the markup I see ā€œ\f1a8ā€, do you know where itā€™s possible to find the latest most up to date list?

UPDATE: found here https://www.sagebeacon.ai/dnd/themes/SuiteP/css/suitep-base/suitepicon.html

Thank you

@robert_sinclair

variant 1:

  • take the file themes/SuiteP/css/suitep-base/suitepicon.woff
  • drop to the service

variant 2:

  • open in browser the file themes/SuiteP/css/suitep-base/suitepicon.html

I donā€™t know how relevant the file of the second variant but the first has the file which using in SuiteCRM directly.

1 Like

thank you , i packaged everything into a quick video:

https://www.youtube.com/watch?v=XftsQRe8e5I

2 Likes

Thanks for the vid.

But how do I put the css in an installable zip to ship the custom module to a different installation?
And I dont want to overwrite the css on the target, it might have modifications already.
They might even have a custom theme.

1 Like

good points, but iā€™m not 100% sure that thatā€™s doable

Hiā€¦
after posting, I investigated further. Suppose you put the style.css in the zip into a subfolder ā€œcssā€, you can add to the manifest.php following structure.

$installdefs['copy'][] = array (   
  'from' => '<basepath>/css',
  'to' => 'custom/themes/' . 
    SugarThemeRegistry::current() . '/css/' .
    SugarThemeRegistry::getSubThemeDefault(),
),

(Here written in a shorter version, might be better to declared it in the existing ā€œ$installdefsā€ definition.)

The installation routine will but the style.css in the correct folder.

The next problem I see is that you somehow have to empty

cache/themes/

before the style.css will be considered.

1 Like

you can empty

cache/themes

by adding

SugarThemeRegistry::clearAllCaches();

to the manifest.

But the next problem is the browser cache keeping the old css.

1 Like

Excellent comments! I added a link to this thread in the vid

Hi everyone,
Iā€™ve read the whole post exchange regarding replacing an icon for a custom module in the sub menu, how can I go about replacing the icon with a custom non-suitepicon icon?
Thanks

For use of any picture as icon you may use content like this:

.suitepicon-module-accounts:before{content: url("/themes/SuiteR/images/icon_Products.gif") }

thanksā€¦ why is it such a PITA to use custom icons? you have to manually edit the color for each icon for each subtheme too

Icons are not visible.

https://salesagility.github.io/SuiteP-Icon-Font/index.html

Also, not able to open this on browser.

themes/SuiteP/css/suitep-base/suitepicon.html

How to add icon from internet to custom modules in CRM?

I canā€™t view icons on browser.

https://salesagility.github.io/SuiteP-Icon-Font/index.html

Does this work for anyone else?

Using SCRM 7.14

As per Gunnicom post above;

I have a simple 32 x 32 gif for a custom module. Put it in themes/SuiteP/images/

Added style.css in custom/themes/SuiteP/css/Dawn/
as follows;

.suitepicon-module-policies:before {
content: url(ā€œ/themes/SuiteP/images/umbrella-32.gifā€);
}

No matter what url I use I cannot get the gif to appear.

Any ideas please.

Thanks
Terry

Aha!

Solved it. Needed a more complete url;

.suitepicon-module-policies:before {
content: url(ā€œ/crm/themes/SuiteP/images/umbrella-32.gifā€);
}

2 Likes

Are you able to update icon at all places for your custom module POLICIES?

Like sidebar, subpanel and browser tab?

Sorry for looonngg delay in reply. Didnā€™t notice it.

Yes, I get the icons in all the right places.

I have added a custom image icon for my custom chart dashlet module option, but I am unable to modify its CSS style. Specifically, I cannot adjust its width, height, or color. How can I achieve this, or could you please guide me on where I might be going wrong? I have attempted this with both .svg and .png files

.suitepicon-module-leadchart:before{
    content: url("/custom/themes/SuiteP/images/filter.png");
}

Did you do Hard reload & cache clear on your browser?

yeah i did cleared all the cache and tried repair and build also.