Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SP_ContentType - New Resource Proposal #1336

Open
kilasuit opened this issue Jul 21, 2021 · 4 comments
Open

SP_ContentType - New Resource Proposal #1336

kilasuit opened this issue Jul 21, 2021 · 4 comments
Assignees
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. resource proposal The issue is proposing a new resource in the resource module.

Comments

@kilasuit
Copy link

kilasuit commented Jul 21, 2021

Description

Way to provision Content Types in Content Type Hub or Sites

Proposed properties

Name
SchemaXML

Special considerations or limitations

Would also require Site Column Resource to be created - see #1337

@kilasuit
Copy link
Author

Note: Use of SchemaXml and not all other properties that Content Type objects could take is to reduce the overhead in development and is often used cross on-premises & online with CSOM so should allow developers (or admins) to easily use this where they deem it fit to do so

@ykuijs ykuijs added help wanted The issue is up for grabs for anyone in the community. resource proposal The issue is proposing a new resource in the resource module. labels Jul 24, 2021
@ykuijs
Copy link
Member

ykuijs commented Jul 24, 2021

Usually SharePointDsc focusses on infrastructure components, not content. This because editing content can result in a conflict with user edits (e.g. a user edits the title of a site and your desired state is no longer compliant). This resource is a grey area. I like your idea to also allow managing the Content Type Hub, which is something end users are unable to edit. That is why I think this resource is a valuable one.

Do you have an example of the SchemaXML?

@ykuijs ykuijs added the enhancement The issue is an enhancement request. label Jul 24, 2021
@kilasuit
Copy link
Author

Example of the SchemaXML for the built-in Item ContentType (taken from my SharePoint Online tenant)

<ContentType ID="0x01" Name="Item" Group="List Content Types" Description="Create a new list item." Version="0" FeatureId="{695b6570-a48b-4a8e-8ea5-26ea7fc1d162}">
    <Folder TargetName="_cts/Item" />
    <Fields>
        <Field ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}" Name="ContentType" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="ContentType" Group="_Hidden" Type="Computed" DisplayName="Content Type" Sealed="TRUE" Sortable="FALSE" RenderXMLUsingPattern="TRUE" PITarget="MicrosoftWindowsSharePointServices" PIAttribute="ContentTypeID" DelayActivateTemplateBinding="GROUP,SPSPERS,SITEPAGEPUBLISHING" Customization="">
            <FieldRefs>
                <FieldRef ID="{03e45e84-1992-4d42-9116-26f756012634}" Name="ContentTypeId" />
            </FieldRefs>
            <DisplayPattern>
                <MapToContentType>
                    <Column Name="ContentTypeId" />
                </MapToContentType>
            </DisplayPattern>
        </Field>
        <Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title" Group="_Hidden" Type="Text" DisplayName="Title" Required="TRUE" FromBaseType="TRUE" DelayActivateTemplateBinding="GROUP,SPSPERS,SITEPAGEPUBLISHING" Customization="" ShowInNewForm="TRUE" ShowInEditForm="TRUE"></Field>
    </Fields>
    <XmlDocuments>
        <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
            <FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
                <Display>ListForm</Display>
                <Edit>ListForm</Edit>
                <New>ListForm</New>
            </FormTemplates>
        </XmlDocument>
    </XmlDocuments>
</ContentType>

@kilasuit
Copy link
Author

kilasuit commented Aug 5, 2021

@ykuijs - If you can assign this to me I will work on implementing this next month or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. resource proposal The issue is proposing a new resource in the resource module.
Projects
None yet
Development

No branches or pull requests

2 participants