cancel
Showing results for 
Search instead for 
Did you mean: 

custom icon

lukas
Champ in-the-making
Champ in-the-making
hi
Is it possible to set an custom icon for a custom content type (screenshot attached)?
The content are mails em:email and are stored as a xy.html file.
So it would be nice to change the html-icon of all em:email to a mail icon.

I tried the following, but that didn't work:

        <config evaluator="string-compare" condition="em:email icons">
                <icons>
                        <icon name="email-icon-custom" path="/images/icons/email-custom-icon.png" />
                        <icon name="email-icon-custom" path="/images/icons/email-custom-icon-32.png" />
                        <icon name="email-icon-custom" path="/images/icons/email-custom-icon-64.png" />
                </icons>
        </config>


Thanks for our help

Lukas
4 REPLIES 4

mitpatoliya
Star Collaborator
Star Collaborator
There is already email Icon available in alfresco.
You need not to do anything explicitly to use that Icon.
Only problem I see in your image is that file is ".html" file that is the reason it is not showing Icon properly if you upload email from your outlook it should show proper icon.

lukas
Champ in-the-making
Champ in-the-making
The Emails are not directly imported from outlook.
They are stored in an event-management tool as html-string + meta data and I sync this files into alfresco as a *.html file
Thats the reason why i have created my own content typ em:email, to store this email files.
I also have some other content types like event-folder, for which it would also be nice to have
custom icons.
There could also be *.html files as normal content into the same folder which are no emails, so changing the icon should depend on the type em:email and not only to the file extension.
Is there an easy way to do this?
Thanks for our help

parzgnat
Star Contributor
Star Contributor
Unfortunately the icons that show up in Share are determined by the file extension of the document and not on by content type or mimetype.  You can test this by renaming a file in Share and removing the file extension.  The icon will change to a generic icon.  There is a javascript function named Alfresco.util.getFileIcon(name) located in the alfresco.js file, which is in the share/js folder.  You could always override the function to do what you want to do, but there's no simple/configurable way to do it that I can see.

The screen shot looks like Alfresco Explorer, not Share.