如何将现有数据类型添加到 SharePoint 功能 schema.xml
我基于默认文档库制作了自定义 SharePoint 功能。基本上,我复制了 DocumentLibrary 文件夹并修改了它以及所有必需的 xml 文件,以使其成为唯一的库类型。现在我需要添加指向其支持的内容类型的链接,但它似乎不起作用。我设法通过 Web GUI 完成此操作,但我需要将其直接添加到 CAML 定义中。
据我所知,Link 类型应作为 ContentTypeRef 标记添加到 schema.xml 中。我在文件开头的元数据标记内有以下标记:
<ContentTypes>
<ContentTypeRef ID="0x0101">
<Folder TargetName="Forms/Document" />
</ContentTypeRef>
<ContentTypeRef ID="0x0120" />
<ContentTypeRef ID="0x0105" />
<ContentTypeRef ID="0x01010A" />
</ContentTypes>
是否需要任何其他设置来允许链接类型?上面的代码没有启用链接。 ContentTypeRef 的 ID 值来自 ctypewss.xml 文件。
任何帮助将不胜感激。
I have made a custom SharePoint feature based on default Document Library. Basically I made a copy of the DocumentLibrary folder and modified it and all the required xml files to make it unique library type. Now I need to add link to its supported content types but it seems not be working. I managed to do this via the web GUI but I need to add it straight to the CAML definition.
As far as I know the Link type should be added as ContentTypeRef tag to the schema.xml. I have the following markup inside the MetaData tag in the beginning of the file:
<ContentTypes>
<ContentTypeRef ID="0x0101">
<Folder TargetName="Forms/Document" />
</ContentTypeRef>
<ContentTypeRef ID="0x0120" />
<ContentTypeRef ID="0x0105" />
<ContentTypeRef ID="0x01010A" />
</ContentTypes>
Is there any other setup required to allow the link type? The above code doesn't enable links. The ID values of ContentTypeRef are from ctypewss.xml file.
Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的内容类型参考似乎是错误的
请点击此网址中的链接,这可能对您有帮助内容类型 ID
It seems your content type refs are wrong
follow the link from this url that might be help for you Content Type IDs