There is a notification list that contains all notifications. We think this list supports displaying notifications created by ourselves and notifications to be expired. So we need to create a custom list, which has two views: notification to be expired, my notification.
Development Environment: Microsoft Windows SharePoint Services 3.0, Microsoft Office Sharepoint Server 2007, Microsoft Visual Studio 2008, Visual Studio 2008 extensions for Windows SharePoint Services 3.0, version 1.3
1: Create a project
Open vs2008 and create a list definition. We use annoucementlibrary as the project name.
In base list definition, select notification (announcements ).
Create an instance of this list: If this check box is selected, a list instance is created when feature is activated. If it already exists, it is not created. If not selected, You need to manually wear the list instance.
Add with event handler Er: select this check box if you want to add events to the list.
Created successfully.
Double-click listdefinition. xml and modify displayname.
2: Open schema. XML, modify the expires field to a required field, and add required = "true ".
3: added the "notification to be expired" view.
Find the <views> node, which already has several views. Each view is used for a unique ID.Baseviewid1 is the default view, which containsDefaultview = "true",Copy an existing view and modify it.
Here we will set the baseviewid of this node to 2, and set this view as the default, url = "expires. aspx ".
Locate the <query> node under the view node and insert the <groupby> and <where> subnodes.
4: added the "My notifications" view.
This is similar to the newly added "notification to be expired" view. Set its baseviewid to 4, url = "myitems. aspx"
Insert <groupby> and <where> subnodes.
5: Add a page to display the two views.
Copy, paste allitems. aspx, and change the file name to expires. aspx and myitems. aspx.
7: deploy this feature
With vsewss, it is easy to deploy.
8: Deployment. Use this feature
Go to the SharePoint site and enterWebsite settings
EnterWebsite Functions, Find annoucementlibrary, and click "Activate" to activate this feature.
After successful activation, we can use our list.
I just got in touch with Sharepoint. If there is any error, please advise. Thank you. Pai_^