sp-dev-fx-webparts/samples/react-provision-assets/sharepoint/assets/listSchema.xml

75 lines
3.1 KiB
XML
Raw Normal View History

<List xmlns:ows="Microsoft SharePoint"
Title="List Schema"
Name="ListSchema"
Direction="$Resources:Direction;"
Url="Lists/ListSchema"
BaseType="0"
EnableContentTypes="TRUE"
FolderCreation="FALSE"
VersioningEnabled="TRUE"
MajorVersionLimit="100"
EnableMinorVersions="FALSE"
MajorWithMinorVersionsLimit="0"
DisableAttachments="FALSE"
xmlns="http://schemas.microsoft.com/sharepoint/"
RootWebOnly="FALSE">
<MetaData>
<ContentTypes>
<!-- ContentType: SPFxItem -->
<!--
I could not make the required fields work
by just specifying <ContentTypeRef ID="0x0100CEADAD40C6630B489BDF172555628DA0" />.
If ContentTypeRef used, it creates new 'Item' ContentType that inherits from SPFxItem (0x0100CEADAD40C6630B489BDF172555628DA0)
but this removes the Required="TRUE" rule from the fields this is why I came with bellow solution.
See: https://msdn.microsoft.com/en-us/library/office/aa543822(v=office.14).aspx.
-->
<ContentType ID="0x0100CEADAD40C6630B489BDF172555628DA0"
Name="SPFxItem"
Group="SPFx Content Types"
Description="">
<FieldRefs>
<!--Title Site Column -->
<FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Required="TRUE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
<!-- SPFxDescription Site Column -->
<FieldRef ID="{f4e5dd71-448f-40e2-b991-35874a0d7fd6}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
<!-- SPFxImage Site Column -->
<FieldRef ID="{0ad9d45c-b110-4635-b149-2890aa3a2513}" Required="FALSE" ShowInNewForm="TRUE" ShowInEditForm="TRUE" />
</FieldRefs>
</ContentType>
</ContentTypes>
<Fields></Fields>
<Views>
<View BaseViewID="1"
Type="HTML"
WebPartZoneID="Main"
DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;"
DefaultView="TRUE"
MobileView="TRUE"
MobileDefaultView="TRUE"
SetupPath="pages\viewpage.aspx"
ImageUrl="/_layouts/images/generic.png"
Url="AllItems.aspx">
<XslLink Default="TRUE">main.xsl</XslLink>
<JSLink>clienttemplates.js</JSLink>
<RowLimit Paged="TRUE">30</RowLimit>
<Toolbar Type="Standard" />
<ViewFields>
<!-- Name is the InternalName -->
<FieldRef Name="LinkTitle"></FieldRef>
<FieldRef Name="SPFxDescription"></FieldRef>
<FieldRef Name="SPFxImage"></FieldRef>
</ViewFields>
<Query>
<OrderBy>
<FieldRef Name="ID" />
</OrderBy>
</Query>
</View>
</Views>
<Forms>
<Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
</Forms>
</MetaData>
</List>