cancel
Showing results for 
Search instead for 
Did you mean: 

Custom icon for a custom type..

mrt
Champ in-the-making
Champ in-the-making
Is it possible to specify a custom icon for a custom type? In my web-client-config-custom.xml file I've tried to specify something like the following:


<config evaluator="node-type" condition="ns:myCustomType">
        <icons>
            <icon name="custom" path="/images/icons/custom.gif"/>
        </icons>
</config>

referring to a file custom.gif that I copied to images/icons/

In the web client it appears that all visible icons are associated with file type. My custom content type does not have a file type so the image i get served up in the space view is:

http://alfrescohost:8080/alfresco/images/filetypes32/_default.gif

I'm obviously attempting something impossible, or doing it wrong. Grateful for any hints you can give.
1 REPLY 1

gavinc
Champ in-the-making
Champ in-the-making
The icon configuration is for space icons only, used by the Advanced Space Wizard. This will allow you to specify a list of icons you can use for your custom type, however your config is slightly wrong, you need to have the string "icons" in your condition as follows:

<config evaluator="node-type" condition="ns:myCustomType icons">

And you also need to add your custom type to the space wizard config:

<config evaluator="string-compare" condition="Space Wizards">
   <folder-types>
      <type name="ns:myCustomType" icon="/images/icons/yours.gif" … />
   </folder-types>
</config>

However, if you want custom icons for content types then you'll need to plugin a custom property resolver. This is all setup in the queryBrowseNodes() method in BrowseBean, in particular look at setupCommonBindingProperties(). You'll need to look at the 'fileType16' and 'fileType32' resolvers.

Hope this helps.