在sharepoint开发中经常遇到 自定义网站栏、内容类型,页面布局和模板页也会遇到,遇到机会就相对比较小。
首先新建一个空的sharepoint项目:
1)创建网站兰:
修改SiteColumns\Elements.xml文件如下:
<?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Field ID="{76C140E1-D827-433B-AD38-257F9594B846}" Name="BenefitProvider" DisplayName="Provider Name" Group="Human Resources" Type="Text" Required="FALSE"/> <Field ID="{A1758D70-B479-469C-90BB-C3038ED42B15}" Name="BenefitProviderLogo" DisplayName="Provder Logo" Group="Human Resources" Type="Image" Required="FALSE"/> <Field ID="{5F516D92-969C-4661-81B9-C9210E2A2FDC}" Name="BenefitType" DisplayName="Benefit Category" Group="Human Resources" Type="Choice" Required="FALSE"> <CHOICES> <CHOICE>Medical</CHOICE> <CHOICE>Dental</CHOICE> <CHOICE>Vision</CHOICE> <CHOICE>Insurance</CHOICE> </CHOICES> </Field> <Field ID="{521D5F12-16BC-4E82-997C-F28933ABE59E}" Name="BenefitDescription" DisplayName="Benefit Description" Group="Human Resources" Type="HTML" RichText="TRUE" RichTextMode="FullHtml" Required="FALSE"/> </Elements>