Build Custom content types in WSS 3.0)

Source: Internet
Author: User
Overview: In Windows SharePoint Services The content type is a set of reusable settings that are applied to specific content. Learning in Microsoft Visual maxcompute 2005 Is WSS 3.0 Build Custom content types.

Application:Microsoft Office 2007, Windows SharePoint Services 3.0, Microsoft Visual Studio 2005 extensions for Windows SharePoint Services 3.0

Joel Krist, akona sustems Inc

2008.1

Summary

Content type, inWindows SharePoint Services 3.0The provided functions and services are a core concept designed to help users organize in more ways.SharePointContent. The content type is a set of reusable settings that are applied to specific content. The content type enables you to manage the metadata and behavior of a document or list type in a centralized and reusable manner.

Microsoft Visual Studio 2005 extension for Windows SharePoint Services 3.0Create a customSharePointThe content type provides new support. How to UseMicrosoft Visual Studio 2005 extensions for Windows SharePoint Services 3.0BuildWSS 3.0Custom content type.

Code it

This section describes how to build a custom content type.

1.InMicrosoft Visual StudioCreate an emptySharePointApplication project.

2.AddSharePointCustom content type.

3.Edit attributes and fields of the custom content type.

4.Compile andSharePointType of custom content published on the site.

 InVisual Studio 2005Create an emptySharePointApplication Project

 Follow these steps:

1.StartVisual Studio

2.In the file button, click Create, and then click Project. The Create Project dialog box appears.

3.On the project type option, selectVisual C #Then selectSharePoint.

4.On the template option, select null to specify a name and storage location for the project, and then click OK.Visual StudioCreate a solution that contains an empty project.

Figure1Create an emptySharePointApplication Project


Add a custom content type to the Project

Visual Studio extensions for Windows SharePoint Services 3.0To createSharePointTo support custom content types, follow these steps:

1.InVisual StudioSolution view, right-click the empty project created above, click Add, and click Add file,Visual StudioShows the cross-frame for adding new file pairs.

Figure2Add a custom content type

2.On the type option, expandVisual C #Project collection node, and then selectSharePoint.

3.On the template option, select the content type. Name content type, and then click Add.Visual StudioThe content type Setting dialog box is displayed.

Figure3Content type settings

4.Select a base content type and specify whether the type contains the event receiver. Click OK to add a new content type to the project.

Edit attributes and fields of the custom content type

Visual StudioAdd two descriptive content types to the ProjectXMLFile:[Contenttypename]. xmlAnd[Contenttyepname]. Fields. xml. Where,[Contenttypename]. xmlThe file contains the identifier of the description content type: ItsID, Name, group, description, and reference to fields or columns. It is associated with the content type.[Contenttyepname]. Fields. xmlThe file contains the description field or column identifier, and is associated with the content type. Edit these two files to change the default attributes of the content type and specify the columns it uses. For more information, see[Contenttypename]. xmlFor information about the content type attribute used in the file, see Content type definition Architecture. For more information, see[Contenttyepname]. Fields. xmlFor more information about the field attributes, see Field definition Architecture.

Types of compiled and released content

Content-Type projects can be compiled and released. InVisual StudioIn the compilation menu, click Generate solution.Visual StudioCompiled content typeProgramSet and generate the necessary configuration files to release the solution. ThenSharePointPublish the solution on the site.

Figure4Compile and release Solutions

Now you canSharePointCombine the content type with a list or appropriate type library to test the new content type. For more information about combining content types with lists or libraries, see Add an existing content type to a list or library.

Summary:

This article demonstrates how to useMicrosoft Visual Studio 2005 extensions for Windows SharePoint Services 3.0InSharePoint 1, 3.0Build a custom content type. Key steps include:

1.InMicrosoft Visual StudioCreate an emptySharePointApplication project.

2.AddSharePointCustom content type.

3.Edit attributes and fields of the custom content type.

4.Compile andSharePointType of custom content published on the site.

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.