SharePoint Solution Pack: how do I get a custom icon for my features?

I'm not sure how stupid I am that I am here!

I have a solution that packs some master pages and layouts, etc., that I can deploy, and the function is perfectly displayed in the "Site Collection Features" list. However, I would like to add a custom icon next to my function. I would like the icon to be in the solution package, and therefore requires that the image be placed in a list or folder when the solution is deployed (and not the function is activated).

Is it possible? just?

There is something about this whole solution. Sharepoint / feature.xml / element.xml I'm not grok yet!

+6
deployment sharepoint solution sharepoint-2007
source share
3 answers

It is possible and simple.

  • In your Feature.xml file, simply add the ImageUrl = "" attribute and specify the location of your image. Best practice is to create a folder in the Template \ Images folder with your images, and then link to that location.
  • Include the folder containing your images in the solution ddf file.
  • After deployment, you should have the% 12HIVE% \ Templates \ Images \ ACMEImages folder that contains your image

Feature.xml example:

<Feature Id="21F724AE-9C1C-4F4D-AAE9-7789CA01A7E3" Title="ACME Lists" Description="List definitions for the ACME" Version="1.0.0.0" Hidden="false" Scope="Web" ImageUrl="ACMEImages\acmelogo.png" xmlns="http://schemas.microsoft.com/sharepoint/"> <!-- other feature file info omitted --> 

Example DDF file:

 .Set DestinationDir=IMAGES\AcmeImagesRootFiles\TEMPLATE\IMAGES\ACMEIMages\acmelogo.png 
+11
source share

In SharePoint 2010, the default Microsoft icon: GenericFeature.gif is a 31 x 22 image. With VS 2010 and SP 2010, you can add a mapped SharePoint Images folder to a SharePoint project. Then put your image in this folder. Be sure to include the image URL in the Properties panel of the * .feature object. Use the image path as above.

+8
source share

Pete's solution did not work for me, although I did exactly what he was offering. My problem is that SharePoint is looking for the image in the / _Layouts folder, and not in the Templates / Images folder.

0
source share

All Articles