1

I've read the documentation but still tried to add a custom icon to a custom admin menu with an extension

_custommenu_civix_insert_navigation_menu($menu, 'Docuthèque', [
    'label' => 'Dossier formation FC PSE1',
    'name' => 'Dossier formation FC PSE1',
    'url' => 'https://ffmns.gestad.net/documents/2022/11/dossier-fc-pse1.xlsx/',
    'permission' => 'access CiviCRM',
    'attr' => ['target' => '_blank'],
    'icon' => 'crm-i fa-file-spreadsheet'
  ]);

It doesn't work but can you confirm that this is really not possible?

2
  • Can you include the custom code params? Commented Nov 30, 2022 at 12:25
  • edited. The menu works, just the icon doesn't show up Commented Nov 30, 2022 at 12:35

1 Answer 1

1

I don't think there isn't any icon with 'fa-file-spreadsheet' in Civi. Can you check in the New Activity type form if the one you are looking for is present or the one you can select from the list?

Hover on one of the icons, it should display the icon text which you can use in the code. For example, I would replace fa-file-spreadsheet with fa-plus-square-o from the screenshot below.

Or you can use the list from Font-Awesome icons.

Based on your code example I would use 'crm-i fa-file-excel-o'

HTH

Pradeep

enter image description here

2
  • OMG, that was so obvious, thanks Pradeep! Commented Nov 30, 2022 at 13:34
  • 'icon' => 'crm-i fa-file-excel-o' works like a charm :-) Commented Nov 30, 2022 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.