如何将现有数据类型添加到 SharePoint 功能 schema.xml

发布于 2024-10-04 23:36:26 字数 644 浏览 0 评论 0原文

我基于默认文档库制作了自定义 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

兔小萌 2024-10-11 23:36:26

您的内容类型参考似乎是错误的
请点击此网址中的链接,这可能对您有帮助内容类型 ID

It seems your content type refs are wrong
follow the link from this url that might be help for you Content Type IDs

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文