Feb 13 2020 08:07 PM
Hello Everyone,
I have created a site content type called "test" and I have a list called "clients" at which i have added this content type as default content type. and then I have added all the list column to it.
When I export the template and apply for new site, list columns are not properly bind to that default content type. Because of this we need to manually add them in that content type again.
Note: We don't want to create these columns as site columns as we have different requirement.
I have failed to make this work, can someone help me out to see something like below when we use template?
PNP Schema that I have exported is(not sure how to bind it for each column here):
Feb 14 2020 08:42 AM
SolutionHey @gadagottiraj,
Not sure if it will help since you told you don't want to create a site column, but I had a similar problem with content type and I was to find create it using provision.
In my case, I needed to add a column to Site Pages. My solution was to create a site column with the
<pnp:SiteFields>
<Field Type="Lookup" DisplayName="FieldName" ID="{fieldID}" SourceID="{{siteid}}" .../>
</pnp:SiteFields>
...
<pnp:ContentTypes>
<pnp:ContentType ID="xxxx" Name="Site Page" ...>
<pnp:FieldRefs>
<pnp:FieldRef ID="fieldID" Name="FieldName" UpdateChildren="false" />
</pnp:FieldRefs>
...
</pnp:ContentType>
</pnp:ContentTypes>