Additional Relational Metadata for artifacts in MOSS -- Part 2
Last week we saw the First Part of the blog "Adding Additional Metadata to the list/library". Today we will see what next to be done post creation of the database.
The following activities will have to be done to take this to completion
• Remove the existing edit metadata page
• Create a new ASPX page which can be used to capture both the standard flat metadata and the hierarchical metadata
• Link this page with the document library
• Create a custom Edit Metadata page which would contain both the linear and the hierarchial metadata.
• Replace the existing edit metadata page with the custom one
This calls for the creation of a new Document Library Type as a feature and be installed in the Web Application. When the end user needs to create a document library, (s)he will create the same using this custom library so that they have the custom edit page for the metadata.
Custom Document Library
The easiest way to start on this is to create a copy of the existing document library feature (<<Install Drive>>:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES). Post giving the custom name to the feature, the following files needs to be updated in the feature folder
• Feature.xml – The following node
<ElementManifests>
<ElementManifest Location="ListTemplates\DocumentLibrary.xml" />
</ElementManifests>
Needs to be replaced by the one shown below
<ElementManifests>
<ElementManifest Location="ListTemplates\DocumentLibrary.xml" />
<ElementFile Location="MyDocLib\schema.xml" />
<ElementFile Location="MyDocLib\Basic.aspx" />
</ElementManifests>
Here in the above code we are registering the customized schema file and the editform.aspx
Schema File – This is required to remove the existing edit contextual menu and add our custom edit form in its place. Search for the below mentioned code in the schema file
<Forms>
<Form Type="DisplayForm" SetupPath="pages\form.aspx" Url="Forms/DispForm.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" Url="editform.aspx" WebPartZoneID="Main" />
<Form Type="NewForm" Url="Forms/Upload.aspx" WebPartZoneID="Main" />
<Form Type="NewFormDialog" Path="EditDlg.htm">
Change the editform,aspx to the <<custom file>>.aspx
After adding the files to the feature library install the feature using stsadm –o –installfeature command.
Activate the feature for the specific site.
Hope this was useful and enjoyed the reading. You can try the same and get back in case there are any issues.

