AnsweredAssumed Answered

How to change default icon folder based on its properties?

Question asked by billydekid on May 13, 2017
Latest reply on May 16, 2017 by billydekid

Hi,

I want to change the default folder icon by its properties with my own icon.

I have a custom folder properties ar:dirFunction.

 

The first one of document library view I try to change is on "detailed" version which is in share/components/documentlibrary/documentlist-view-detailed.js. In following lines:

 

      getDefaultFolderIcon : function DL_VR_getDefaultFolderIcon()
      {
         return "components/documentlibrary/images/folder-64.png";
      },

to

      getDefaultFolderIcon : function DL_VR_getDefaultFolderIcon()
      {
         if(properties[ar:dirFunction] === "ObjectiveDir")
             return "components/documentlibrary/images/folder-64-green.png";
         else
             return "components/documentlibrary/images/folder-64.png";
      },

But the folder's icon with specified ar:dirFunction as mentioned above is not change.

 

What is the correct way to solve this?

Thanks in advance.

 

[bayu]

Outcomes