日历和内容类型
问题描述:
我已经创建了一个带有内容类型的SharePoint日历:可用和不可用。 “全天事件”, “重复”和“工作区”字段在新内容类型中不可用。我需要“全天事件”和“恢复”字段。我没有在这个日历上使用“Event”内容类型。 全日事件和相关列应该在新内容类型上可用吗?
如果是这样,我可能做错了什么? 如果不是,我如何获得所需的列到新的内容类型?日历和内容类型
谢谢
答
您的内容是从事件内容类型派生出来的吗?我相信隐藏事件内容类型,但使用功能创建您的内容类型并使用内容类型标识层次结构让您的可用/不可用内容类型从Sharepoint事件内容类型派生,可以解决您的问题。删除您不需要的任何字段(网站栏)。
使用下面的xml片段来创建派生的内容类型。恕我直言,当您计划创建超过1个版本的ctype时,最好先创建一个从开箱即用的sharepoint ctype派生的基本内容类型。
<!-- 0x0102 is the sharepoint event content type's id,
00 is a splitter,
the rest is a guid that you generate, stripped of dashes and {}
i.e. {54646609-853E-4f28-B4F8-B6258DBFD632}
add 01, 02, etc. at the end to create ctypes derived from this base ctype-->
<ContentType ID="0x01020054646609853E4f28B4F8B6258DBFD632"
Name="Event Derived Base Content Type"
Description="This serves as a base for all your event ctype derived ctypes"
Group="Group the ctype should fall under in ctypes site settings page">
<FieldRefs>
</FieldRefs>
</ContentType>
<!-- by adding 01 you create a new, specific purpose ctype-->
<ContentType ID="0x01020054646609853E4f28B4F8B6258DBFD63201"
Name="Available"
Description="Your description"
Group="Name of group">
<FieldRefs>
</FieldRefs>
</ContentType>
<!-- same for 02 -->
<ContentType ID="0x01020054646609853E4f28B4F8B6258DBFD63202"
Name="Unavailable"
Description="Your description"
Group="Name of group">
<FieldRefs>
</FieldRefs>
</ContentType>