自定义SharePoint 2010 DocumentSet ContentType
-
09-12-2019 - |
题
我正在研究类型文档集的自定义ContentType。我想设置Alllowed ContentTypes,但这不起作用,它只显示Defeult文档。我读了几个博客,但我找不到我的解决方案。
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Parent ContentType: Document Set (0x0120D520) -->
<ContentType ID="0x0120D520008d2ff418027e4c31b54d155b98596748"
Overwrite="True"
Name="Custom Dossier"
Group="Custom group"
Description="Custom dossier"
Inherits="True"
Version="0">
<FieldRefs>
<FieldRef ID="{8D6C094C-3E1F-41f4-BEE3-25B27EE09702}" Name="Dossier_Nummer" DisplayName="Dossiernummer" Required="True" />
</FieldRefs>
<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/office/documentsets/allowedcontenttypes">
<act:AllowedContentTypes xmlns:act="http://schemas.microsoft.com/office/documentsets/allowedcontenttypes" LastModified="05/31/2012 08:46:56">
<AllowedContentType id="0x0101" />
<AllowedContentType id="0x0101000490d50c50624b6ca21c637ef39cd89b" />
</act:AllowedContentTypes>
</XmlDocument>
</XmlDocuments>
</ContentType>
</Elements>
. 解决方案
请尝试将内容类型上的Inherits属性设置为false。 如果将inherit属性设置为true(拒绝,默认,则导致默认忽略任何声明,导致默默忽略任何声明,默认情况下是真的)。我怀疑这应该是你的案例(我不认为任何CU / SP都修复了今天的错误)。
只是记住弥补继承=“false”属性...并为SharePoint Dev Devity点亮了蜡烛,如果您没有8个儿童内容类型也可以更新...
其他提示
我在哪里可以在哪里创建doc设置内容类型,set inherits=“true”,仍然保留所有自定义xmldocuments。基本上,这个想法是在部署CType定义的功能上使用特征接收器,从而拔出元素.xml文件,并将xmldocuments复制到网站上的ctype defs(忽略更改,因为继承=“true”)。我在我的博客上有一些示例代码:
http://morefunthanapokeintheeye.blogspot.com/2012/10 / how-to-comple-publish-custom.html