Add new icon for search results

Add new icon for search results

From Datafari v6.2

It may happen that you have indexed documents with a specific extension which is not known by Datafari. If this is the case, the concerned documents will be displayed with a default icon in Datafari (see the last document below):

image-20250624-101930.png

If you want to add your specific icon, you need to do it in the source code. Get it here: https://gitlab.datafari.com/datafari-community/datafariui-v2/-/tree/main.

Then, add your new icon in “DATAFARI_HOME_DIR/www/images/file_icons“. The file must be a png type and respect the following pattern :  icon_square_[extension_name]_V01-24px.png

For example, the icon file to add to the icons folder in order to correct the problem showed above would be : icon_square_dotx_V01-24px.png

Then compile the code and deploy it. See how to do it here https://gitlab.datafari.com/datafari-community/datafariui-v2/-/blob/main/README.md.

A ticket has been opened for dynamic icon adding: https://gitlab.datafari.com/datafari-community/datafariui-v2/-/issues/138

 


Valid from Datafari 5.1 (UI 1.0.0-beta-0.6.0) up to v6.2

It may happen that you have indexed documents with a specific extension which is not known by Datafari. If this is the case, the concerned documents will be displayed with a default icon in Datafari (see the last document below):

image-20250624-101930.png

If you want to add your specific icon, you can do it in “DATAFARI_HOME_DIR/www/images/file_icons“. The file must be a png type and respect the following pattern :  icon_square_[extension_name]_V01-24px.png

For example, the icon file to add to the icons folder in order to correct the problem showed above would be : icon_square_dotx_V01-24px.png

Of course you can make a copy of an existing icon from the icons directory and rename it.

Once the icon is available, it will be automatically used by Datafari.


Valid for Datafari 4.x

It may happen that you have indexed documents with a specific extension which is not known by Datafari. If this is the case, the concerned documents will be displayed in the result view without any icon (here Template_Document.dotx):

To correct/avoid this, you will have to add a new icon for your concerned extension in 'DATAFARI_HOME_DIR/tomcat/webapps/Datafari/images/icons'. The file must be a png type and respect the following pattern :  [extension_name]-icon-24x24.png

For example, the icon file to add to the icons folder in order to correct the problem showed above would be : dotx-icon-24x24.png

Of course you can make a copy of an existing icon from the icons directory and rename it.

Once the icon is available, it will be automatically used by Datafari.