Subscribe:

Labels

Thursday, June 2, 2011

creating custom List defintion

CREATING A CUSTOM LIST DEFENTION  

1.       Create a folder named CommentsList  in the FEATURES directory.
2.       Create a xml file named feature.xml that contains the following information:



1.       Create a folder named ListTemplate inside the CommentsList  folder and add an xml file named CommentsList.xml that contains the following information:




Here we are defining a unique type number for our list (which can be used if we want to include this list in a custom site definition), the sequence it should appear in the ‘create’ page and other basic attributes. Note the displayname used must match the folder that contains the list schema defined n the next step.
1.       Create a folder named Comments inside the CommentsList folder and copy the FEATURES\CustomList\CustList\Schema.xml file into the Comments folder

2.        Update the ContentTypes element in the Schema.xml file to the following:
<ContentTypes>
<ContentTypeRef ID="0x01AB">
<Folder TargetName=" Comments " />
</ContentTypeRef>
<ContentTypeRef ID="0x0120" />
</ContentTypes>
3.       Update the Fields element in the Schema.xml file to the following:














1.       Install the Feature using the Following stsadm command
stsadm -o installfeature -filename CommentsList\feature.xml -force

2.       Activate the Feature for a Sitecollection using the following command a xml file named
stsadm -o activatefeature -filename CommentsList \feature.xml -url  http://localhost
3.       Do an IIS Reset and Open.
4.       Go to the Feature Activated Site and go to SiteAction -> Site Settings.
5.       Under Custom List Category you will be able to see a List by Comments.



No comments:

Post a Comment