Menu
SuiteCRM Pull Request Party hosted by SalesAgility
Welcome, Guest
Username: Password: Remember me

TOPIC: Using Font Awesome for Custom Page

Using Font Awesome for Custom Page 2 months 1 week ago #75277

  • benedict90
  • benedict90's Avatar
  • Offline
  • Junior Member
  • Posts: 36
  • Thank you received: 1
  • Karma: 0
Hi, we want to build customized edit and detail view page for our custom module.
Our UI / UX designer is using font awesome to add some icons to the buttons.
But, when I implement it, the icons are shown but other javascript files not working.
I have checked via Google Chrome Inspect Tools, but no error found.

How to solve this issue?
How to make all script (css and js) working properly even added font awesome script?

Thanks in advance.
Last Edit: 2 months 1 week ago by benedict90.
The administrator has disabled public write access.

Using Font Awesome for Custom Page 2 months 1 week ago #75289

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 9081
  • Thank you received: 1369
  • Karma: 332
SuiteCRM already includes Font-Awesome, and you can find examples in the code of how to use it. Are you using the latest SuiteCRM version?

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

Using Font Awesome for Custom Page 1 month 3 weeks ago #75896

  • benedict90
  • benedict90's Avatar
  • Offline
  • Junior Member
  • Posts: 36
  • Thank you received: 1
  • Karma: 0
No, I am using SuiteCRM version 7.8.5
The administrator has disabled public write access.

Using Font Awesome for Custom Page 1 month 3 weeks ago #75899

  • cherub-chum
  • cherub-chum's Avatar
  • Offline
  • Elite Member
  • One Stop Solution
  • Posts: 191
  • Thank you received: 36
  • Karma: 13
In order to include custom files in Edit or Detail View, you can add them in their respective defs files. For example for adding a JS or CSS file for EditView, we would modify the modules editviewdefs.php. Check this file at custom/modules/<MODULE_NAME>/metadata/editviewdefs.php . If it does not exists, copy it from modules/<MODULE_NAME>/metadata/editviewdefs.php to this path.

Now modify the editviewdefs.php code as follows.
$viewdefs [$module_name] = 
array (
  'EditView' => 
  array (
    'templateMeta' => 
    array (
      'maxColumns' => '4',
      'form' => 
      ( .....
      ),
      'includes' => 
      array (
        0 => 
        array (
            'file' => 'custom/modules/<MODULE_NAME>/js/custom.js',
        ),
      ),

The includes index is where you add the array for custom files.
Everything seems impossible, until its done.

Skype : cherubchum
The administrator has disabled public write access.
The following user(s) said Thank You: pgr
Time to create page: 0.054 seconds
Powered by Kunena Forum