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]
Solved! Go to Solution.
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.
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.
Hi Cesar,
Thank you for pointing to this subject.
[bayu]
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.
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.
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]
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]
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.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.