05-13-2017 02:24 AM
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]
05-13-2017 12:30 PM
Hi:
Maybe you can use a custom indicator, it is exactly for your purpose, which changes depending on a custom aspect, type or a property:
Document Library | Alfresco Documentation
Regards.
--C.
05-13-2017 12:30 PM
Hi:
Maybe you can use a custom indicator, it is exactly for your purpose, which changes depending on a custom aspect, type or a property:
Document Library | Alfresco Documentation
Regards.
--C.
05-13-2017 05:10 PM
Hi Cesar,
Thank you for pointing to this subject.
[bayu]
05-13-2017 05:18 PM
05-14-2017 01:04 PM
Hi Bayu:
I would not say that it is not possible, but the custom indicator is a type of Share extension that is made for that purpose. I use custom indicators in these cases. Besides, you are only considering the detailed view of the folder (when the folder icon is big), but you have also other views such as the simple view or the table view of the Document Library. With the same evaluator you may also show differences between documents via metadata templates.
Regards.
--C.
05-16-2017 01:51 AM
Hi Cesar,
Yes, off course I have also modify for another views of the Document Library.
Last, since I'm new on this issue, what's the meaning of "metadata templates" - Is it the same with applying custom model to content/folder (in Model Manager)?
[bayu]
05-16-2017 03:02 AM
Hi Bayu:
A metadata template defines a custom view based on an evaluator (for example, for a given custom type, let's say contract). The default detailed view of the Document Library is rendering a metadata template with some rows like name and title, description, categories, tags and social. You can customize templates adding for example a custom property (let's say, Contract ID). This helps to visualize specialized objects better, as custom indicators.
Regards.
--C.
05-16-2017 03:15 AM
05-15-2017 03:07 PM
Hello Bayu.
You haven't said how you changed the documentlist-view-detailed.js file, but I guess you did it by changing it straight inside the share folder.
If that was the case, then I believe the problem you are facing is because you just change the expanded file, and not the minified one.
What you are trying to do is doable, but I have to agree with , as this will force you to make that change on all the existing views.
A custom indication will do the trick.
05-16-2017 01:54 AM
Hi Douglas,
Thank you, I will try with the minified version 🙂
My concern to replace the "main icon" is to give an eye-catching folder to users, hence he/she will quick to find and access those specific folders.
Thank you,
[bayu]
Explore our Alfresco products with the links below. Use labels to filter content by product module.