I am wanting to create a Custom Document Library for the purpose of targeting a custom action feature to the Custom Document Library's New Menu.
I have found many different guides on the internet, but you know how old those can be.
So what would be the "correct" way to create a custom document library in SharePoint 2007.
Thank you,
Keith
I have taken the approach of copying the OOTB DocumentLibrary folder and files structure from the 12hive\TEMPLATE\Feature directory, changing some of the default files to make this a new CustomDocumentLibrary, and wrapping the new files and folders up as a feature to be deployed with stsadm.
Feature.XML File
- Create a new GUID and change the original Id attribute to this new GUID.
- Change the Title and Description attributes in the feature.xml file to its new name and change the hidden attribute from true to false.
- Update the ElementManifest node to point to the name change in the ListTemplates file.
ListsTemplate Folder
- Change the ListTemplate file name from DocumentLibrary.xml to my new CustomDocumentLibrary.xml
- Change the Name attribute of the CustomDocumentLibrary.xml match the new name library name (CustomDocumentLibrary).
- Change the Type attribute from 101 (document library) to 10055 (you pick and don't duplicate), the new custom list type's ID
DocumentLibrary Folder
- Rename the doclib folder to match the new name of the document library (CustomDocumentLibrary). The new folder name should be the same as the Name attribute in the liststemplate file.
- Keep the EditDlg.htm, filedlg.htm, repair.aspx, schema.xml, and upload.aspx files in the folder.