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

While creating Wiki Page Library from the browser (Site Actions->More Options->Wiki Page Library) is easy, doing it form Visual Studio not so much.

When I create new ListDefinition in VS2010 I use Custom Library or Document library. Then in elements.xml of the ListDefinition I can edit DocumentTemplate (from default for Document Library "101" to "119" for the Wiki Page Library type) but it changes nothing and library stil behaves as normal document library. Is there something more to edit or do I have to generate this library from code?

I want to define my own columns so this is why i need to create ListDefinition. Because if you create new ListInstance you can choose Wiki Pages Library but then you have only Elements.xml in your VS2010 project and can not add custom columns from there (only from Sharepoint Designer).

share|improve this question
add comment

1 Answer 1

Did you remember to change the feature id as well? From onet.xml:

<List FeatureId="00BFEA71-C796-4402-9F2F-0EB9A6E71B18" Type="119" Title="$Resources:core,WikiWebLibPages;" Url="$Resources:core,WikiWebLibPages_Folder;" />
share|improve this answer
    
I need to change Id of the feature that activates this ListDefinition or add this FeatureId attribute to my Schema.xml of the ListDef? –  Piotr Hajduk Aug 3 '12 at 13:32
    
Have a look at this MSDN article: Creating SharePoint 2010 List Definitions in Visual Studio 2010 –  fraabye Aug 3 '12 at 13:36
    
Nice article but it doesn't help me at all. –  Piotr Hajduk Aug 3 '12 at 13:44
    
In your elements.xml, in the line where you changed the template type, change the feature id if it exists. –  fraabye Aug 3 '12 at 14:02
    
There is an existing post around adding fields (columns) to a custom list in elements.xml. –  fraabye Aug 3 '12 at 14:05
show 1 more 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.