Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've created a custom site definition. According to some best practices, I kept it empty and deployed content with a couple of features. These features contain lists and libraries for instance, they're web scoped. The features are linked to the site definition so they are activated when the site is provisioned.

When I now create a new site collection based upon the definition, everything seems to work fine. But when I add a subsite based on the same definition to the root site, something strange happens. The "All Site Content" page isn't displaying any icons for libraries the features added to this site. I checked the HTML source, the image tag has no source i.e. src=""?

Furthermore it all seems to be working ok, but these kinds of things make me a bit nervous. So has anyone seen this behaviour before?

share|improve this question
add comment

2 Answers

Those icons are based on value of "Image" attribute of ListTemplate element. So list instances created from same List Template would typically have save icons.

If you are using existing list templates to create your list instances, your list/library should have the same icons as out of the box list template icons. if you are creating lists from custom list templates, make sure you have Image attrubute specified in your ListTemplate Element.

share|improve this answer
    
I'm declaring a ListInstance in my feature, linked to a custom schema.xml. There's no custom template, just based on default document library template 101. –  Jasper Jan 5 '12 at 15:30
    
did you specify Type attribute of List element in your custom schema? –  Ashish Patel Jan 5 '12 at 15:40
add comment

The icons are mapped through a file called DocIcon.xml. I don't know if that helps or not but you should start there. Perhaps your new site definition (ONET.xml) isn't mapping the new feature icons to it correctly. It's located in /Layouts/XML.

share|improve this answer
    
DocIcon.xml is for mapping document types with icons based on extension of documents, not for list instances that user is asking for. –  Ashish Patel Jan 5 '12 at 15:27
    
docicon.xml is for document types, not for library/list types. –  Jasper Jan 5 '12 at 15:31
    
I stand corrected. –  Josey Jan 5 '12 at 15:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.