cancel
Showing results for 
Search instead for 
Did you mean: 

Customized icon on filetypes according to metadata

kountry
Champ in-the-making
Champ in-the-making
Hi all, i'm very newbie to Alfresco although i know a bit of java and xml programming,

The problem i have is that i want customize filetype icons, according to the value of a metadata, so if you complete this metadata, the icon shown for this file changes to a "special" one in all Alfresco views, else the default icon must be shown.

I have read the forum about adding custom icons to spaces, but nothing help me to try to solve my problem.

Is it possible to do this? And how?

Thanks
8 REPLIES 8

kountry
Champ in-the-making
Champ in-the-making
nobody knows about this?

Maybe is not possible?

orichaud
Champ in-the-making
Champ in-the-making
I don't really know if it is related but I try to change the icon of a folder and a document according to a type. I have created custom types deriving from cm:folder and cm:content and I' try to customize the displayed icon in my share-config-custom.xml
For now,  I haven't been successful.

mikeh
Star Contributor
Star Contributor
There's nowhere in share-config-custom.xml that would allow you to do this.

Thanks,
Mike

rbkprod
Champ in-the-making
Champ in-the-making
I don't know if its at all possible this way, but maybe you should try some JavaScript with a rule to run the script for all items on a specific space and change icons according to mimetype (I'm figuring you'd have to store the icons somewhere and reference them)

   
if (document.mimetype == "text/plain")
{
      document.icon32 = "some reference pointing to the location of the icon here";
}

This all could be completely wrong, just throwing some ideas around.
Another problem you're facing would be browser caching I think, you'd have to refresh the page to view changes made to icons.

orichaud
Champ in-the-making
Champ in-the-making
Thanks for your reply.
I think that, since it is not configurable, the javascript way is the best approach. A check on the class/type of the document (ahpSmiley Tonguehoto –> cm:content) / folder (ahpSmiley Tongueroperty –> cm:folder) will allow the determination of the icon.

If this is managed by a rule, I don't understand how it will work since the rule is fired in reaction to events on documents and spaces (creation, deletion, updates).

@Mike: is there a plan in the roadmap to make icons customizable in the share-config-custom.xml?

Regards.

Olivier

mikeh
Star Contributor
Star Contributor
@Mike: is there a plan in the roadmap to make icons customizable in the share-config-custom.xml?

Regards.

Olivier
No, there's nothing concrete. Best thing to do is raise a new ticket in JIRA and add as many details in there as to how you'd like it to work.

Thanks,
Mike

orichaud
Champ in-the-making
Champ in-the-making

kountry
Champ in-the-making
Champ in-the-making
Thanks all for your answers, but i was asking about a way to display a custom icon based on the value of a metadata, not based on mime type.

I supose if it is not possible in base mime type, unless based on the value of a metadata, right?
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.