0

I want to use a Site Collumn of the type: "Image with formatting and constraints for publishing" and I don't know how the xml in Visual Studio should look like. According to this: http://msdn.microsoft.com/en-us/library/office/aa979575%28v=office.15%29.aspx should I use Type URL and Format Image???

2 Answers 2

2

Here's one example of a Site Column definition for a Publishing Image:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
     <Field ID="{your guid here}" Type="Image" Name="PageImage2" DisplayName="Page Image 2" Group="MyCustomGroup" Required="FALSE" Sealed="FALSE" RichText="TRUE" RichTextMode="FullHtml" DisplaceOnUpgrade="TRUE">
    </Field>
</Elements>
3
  • Thank you for your answer, but can I really use Type="Image"? Because in the Link I've shared there is no Type "Image" available.. Commented Jul 30, 2014 at 6:17
  • Yess, it works. Thank you. But I still do not understand why it is not listed in the available options.. Commented Jul 30, 2014 at 6:36
  • I agree, I'm not sure why it is missing from the documentation. Very strange. Commented Jul 30, 2014 at 15:15
0

You can use OOB PublishingPageImage column in Content Type

<FieldRef ID="{3de94b06-4120-41a5-b907-88773e493458}" DisplayName="$Resources:cmscore,column_pageimage_displayname;" Required="FALSE" Description="$Resources:cmscore,column_pageimage_description;" Name="PublishingPageImage" Sealed="TRUE" />

And then reference it in your list definition:

<Field ID="{3de94b06-4120-41a5-b907-88773e493458}" Name="PublishingPageImage" StaticName="PublishingPageImage" SourceID="http://schemas.microsoft.com/sharepoint/v3" Group="$Resources:cmscore,group_pagelayoutcolumns;" DisplayName="Page Image" Description="$Resources:cmscore,column_pageimage_description;" Type="Image" Required="FALSE" Sealed="TRUE" RichText="TRUE" RichTextMode="FullHtml" />
1
  • That is not what I was searching for. I need a new Site Collumn. Commented Jul 30, 2014 at 6:13

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.