I've spent the past week, trying to
1. Create new Columns in a feature - Done.
2. Create a New Content Type that reference the columns based on a document content type - Done.
3. Create a List Template for a new Custom Document Library - Believe this is done.
4. Create a schema.xml file for the new Custom Document Library. -Fails with a file not found error. Although the Document Library is created, without any views.
Is there anyone who could help me. Even if it sending me a zip of a example you have done, or a step by step guide.
I followed http://ari.provoke.co.nz/archive/2007/04/18/creating-a-custom-sharepoint-2007-list-definition.aspx for creating custom List Definitions and got it to work. I tried to follow the same practice for a document library and failed.
My code so far:
Create a feature:
<Feature
Id="{4088DC4B-EB31-4967-B634-C74558DC5347}"
Title="Config Columns"
Description="This feature contains site columns used in the Global and Local lists/libraries"
Version="12.0.0.0"
Scope="Site"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="configcolumn.xml" />
<ElementManifest Location="configct.xml" />
<ElementManifest Location="DocTemplates\ConfigDocElements.xml" />
</ElementManifests>
</Feature>
ConfigColumn:
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns='http://schemas.microsoft.com/sharepoint/'>
<Field ID="{B76C8224-9EAE-411c-86DD-7E4DC01DEC05}"
Name="Config category"
StaticName="ConfigCategory"
Group="Config Store columns"
Type="Text"
DisplayName="Config category"
SourceID="http://schemas.microsoft.com/sharepoint/v3/fields"
Sealed="TRUE"
AllowDeletion="TRUE"
ShowInFileDlg="FALSE"/>
<Field ID="{3FEC9EC9-104A-4808-A08F-C285AC6D5FF5}"
Name="Config value"
StaticName="ConfigValue"
Group="Config Store columns"
Type="Text"
DisplayName="Config value"
SourceID="http://schemas.microsoft.com/sharepoint/v3/fields"
Sealed="TRUE"
AllowDeletion="TRUE"
ShowInFileDlg="FALSE"/>
<Field ID="{8A4FC2C4-2F0A-4ee1-B9C6-8FC718E09349}"
Name="Config item description"
StaticName="ConfigItemDescription"
Group="Config Store columns"
Type="Note"
NumLines="10"
RichText="TRUE"
RichTextMode="Compatible"
Sortable="FALSE"
DisplayName="Config item description"
SourceID="http://schemas.microsoft.com/sharepoint/v3/fields"
Sealed="TRUE"
AllowDeletion="TRUE"
ShowInFileDlg="FALSE"/>
</Elements>
The Configct.xml file:
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ContentType ID="0x010067555976B4134856AEC19889850F4B69"
Name="Config Item"
Group="Config Store Content Types"
Description="Represents an item in the config store."
Version="0">
<FieldRefs>
<FieldRef ID="{B76C8224-9EAE-411c-86DD-7E4DC01DEC05}" Name="ConfigCategory" Required="TRUE" />
<FieldRef ID="{3FEC9EC9-104A-4808-A08F-C285AC6D5FF5}" Name="ConfigValue" Required="TRUE" />
<FieldRef ID="{8A4FC2C4-2F0A-4ee1-B9C6-8FC718E09349}" Name="ConfigItemDescription"/>
</FieldRefs>
</ContentType>
</Elements>
The ConfigDocElements.xml
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns='http://schemas.microsoft.com/sharepoint/'>
<ListTemplate Name="ConfigDoc"
Type="10101"
BaseType="1"
OnQuickLaunch="TRUE"
SecurityBits="11"
Sequence="360"
DisplayName="Configuration Store Document Library"
Description="Creates a Document Library with appropriate columns for use with the Config Store solution."
Image="/_layouts/images/itdl.gif"
DocumentTemplate="100"
Hidden="False"/>
</Elements>
My Schema file is a copy of the DocumentLibrary schema file put inside a folder called ConfigDoc. (Which matches the name of the ListTemplate Name=" "). All I've done within the schema is added my content type which replaced the Document Content type, and added my columns to the fields, like explained in the URL Link I've put above.
Thank you for any help you can add.