I created a custom content type that inherits from the OOTB SharePoint Image Content Type. The only settings I made was to add a simple URL field and remove the two fields in the base type. See below:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType ID="0x0101020027f16ab27e6e45a6848c25c47aaa7053" Name="Custom Picture" Description="" Group="Custom" Inherits="TRUE" Version="0"> <FieldRefs> <RemoveFieldRef ID="{b66e9b50-a28e-469b-b1a0-af0e45486874}" Name="Keywords" /> <RemoveFieldRef ID="{a5d2f824-bc53-422e-87fd-765939d863a5}" Name="ImageCreateDate" /> <FieldRef ID="{c29e077d-f466-4d8e-8bbe-72b66c5f205c}" Name="URL" DisplayName="URL" Required="FALSE" /> </FieldRefs> </ContentType> </Elements>
If I create an image library based on my custom content type, the “URL” field that I added appears in new / editable forms, however, two fields that I tried to delete also appear, i.e. RemoveFieldRef are ignored . If I look at the content type in "Site Settings → Content Type Gallery", these two fields are still listed there.
Setting Inherits = "FALSE" in my custom content type ( see MSDN definition ) successfully removes just these two fields on the "Site Settings → Content Type Gallery" page, but then none of the base fields are displayed in new / editable forms - only my custom URL -address ".
What can I do to ensure that all fields from the basic type of content "Image" are displayed in new / editable forms of my image library, except for two fields that I specifically deleted?
Nick larter
source share