Use vsewss to create a custom list

Source: Internet
Author: User

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_^

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.