콘텐츠 유형에 대한 사용자 정의 양식이 무시됩니다.
-
10-12-2019 - |
문제
거기 것 같다 목록과 라이브러리에 사용자 지정 양식을 추가하는 여러 가지 방법이 있지만 가장 쉬운 방법은 다음과 같습니다. 것 같다 에서 지정해야 합니다. Elements.xml
주어진 것을 정의하는 파일 ContentType
.(이 이해가 잘못된 경우, 제발 제발 나를 바로잡고 내가 찾은 것보다 더 나은 자료를 알려주세요.
SharePoint 2010 인스턴스에 대해 Visual Studio 2013을 사용하여 다음 ContentType을 정의했습니다.
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Parent ContentType: Workflow Task (0x010801) -->
<ContentType ID="0x010801003EE4B5580C5846B6BE74BFC41A663388"
Name="Technical Review Task"
Group="KB Article"
Description="Content Type for Technical Review Tasks in KB Workflow"
Inherits="TRUE"
Version="0">
<FieldRefs>
<FieldRef ID="{5f8fe565-f627-4aed-b7b1-48e5bd2ec8ac}"
Name="TechnicalReviewAction"
DisplayName="Action"
Required="TRUE" />
<FieldRef ID="{5f4f08ad-7f5b-4d5d-879c-50b416acae3d}"
Name="ActionComment" />
</FieldRefs>
<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
<FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
<Display>Forms/KnowledgeBaseTaskDisplay.aspx</Display>
<Edit>Forms/KnowledgeBaseTaskEdit.aspx</Edit>
</FormUrls>
</XmlDocument>
</XmlDocuments>
</ContentType>
보시다시피 목록 항목을 보고 목록 항목을 편집할 때 사용할 새 양식을 정의했습니다.
문제는 사용자 정의 양식을 사용하지 않고 항목이 계속 기본 양식을 사용한다는 것입니다.보시다시피 목록 항목은 올바른 유형입니다.
해결책
Inherits 특성을 False로 설정한 다음 모든 열을 수동으로 포함해야 합니다.
다른 팁
나는 같은 문제가 있었고 다음과 같이 해결했습니다."xmldocuments"의 블록을 주석하고 Liste의 내용 유형을 설정하고 목록의 Schema.xml 파일을 살펴 보면 컨텐츠 유형을 설정 한 후 동일한 줄을 찾았습니다.그래서 Schema.xml과 콘텐츠 유형에서 주석 처리를 제거하고 배포하면 제대로 작동합니다.
제휴하지 않습니다 sharepoint.stackexchange