1

I have created the following 2 Site Column Definitions and a Content Type that incorporates both of the site columns A List Definition of type Picture Library that utilizes the Content type.

however the columns will not show up in the image library, i tried the same with a normal document library and the columns show up, are there any gotchas when it comes to image libraries, i'm fairly new to SP development and any help will be appreciated

below is what i have thus far:

my two site columns:

<Field
   ID="{82dd667d-5abe-49ba-b3c5-58a1a2499ff9}"
   Name="Type"
   DisplayName="Type"
   Type="Choice"
   Required="FALSE"
   Group="Online Rulebooks"
   Viewable="TRUE"
   ShowInDisplayForm="TRUE" 
   ShowInEditForm="TRUE"
   ShowInFileDlg="TRUE"
   ShowInListSettings="TRUE"
   ShowInNewForm="TRUE">
<CHOICES>
  <CHOICE>Bulletin</CHOICE>
  <CHOICE>Manual</CHOICE>
  <CHOICE>Notice</CHOICE>
</CHOICES>

My Content Type:

<ContentType ID="0x010019D765D3F00E47608BECA1B5CF3FBA13" Name="ListImageContentType" Group="Custom Content Types" Description="My Content Type" Inherits="TRUE" Version="0">
<FieldRefs>
  <FieldRef ID="{fcb82843-efdb-48b9-b686-2f3c511c2771}" DisplayName="Location IDs" Required="TRUE" Name="Location IDs" />
  <FieldRef ID="{82dd667d-5abe-49ba-b3c5-58a1a2499ff9}" DisplayName="Type" Required="TRUE" Name="Type" />
</FieldRefs>

My Library

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

Schema:

<List xmlns:ows="Microsoft SharePoint" Title="List Images" FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/List Images" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/" EnableContentTypes="TRUE">

<Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Type="Text" Name="Title" DisplayName="$Resources:core,Title;" Required="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title" MaxLength="255" /><Field ID="{fcb82843-efdb-48b9-b686-2f3c511c2771}" Name="Location IDs" DisplayName="Location IDs" Type="Note" Required="FALSE" Group="Online Rulebooks"></Field><Field ID="{82dd667d-5abe-49ba-b3c5-58a1a2499ff9}" Name="Type" DisplayName="Type" Type="Choice" Required="FALSE" Group="Online Rulebooks"><CHOICES><CHOICE>Bulletin</CHOICE><CHOICE>Manual</CHOICE><CHOICE>Notice</CHOICE></CHOICES></Field></Fields>
<Views>


<View BaseViewID="0" Type="HTML" MobileView="TRUE" TabularView="FALSE">
    <Toolbar Type="Standard" />
    <XslLink Default="TRUE">main.xsl</XslLink>
    <RowLimit Paged="TRUE">30</RowLimit>
    <ViewFields>


    <FieldRef Name="Location IDs" /><FieldRef Name="Type" /><FieldRef Name="LinkTitleNoMenu"></FieldRef></ViewFields>
    <Query>
      <OrderBy>

      <FieldRef Name="Modified" Ascending="FALSE"></FieldRef></OrderBy>
    </Query>
    <ParameterBindings>
      <ParameterBinding Name="AddNewAnnouncement" Location="Resource(wss,addnewitem)" />
      <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
      <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_ONET_HOME)" />
    </ParameterBindings>
  </View><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">
    <Toolbar Type="Standard" />
    <XslLink Default="TRUE">main.xsl</XslLink>
    <RowLimit Paged="TRUE">30</RowLimit>
    <ViewFields>


    <FieldRef Name="Attachments"></FieldRef><FieldRef Name="LinkTitle"></FieldRef><FieldRef Name="Location IDs" /><FieldRef Name="Type" /></ViewFields>
    <Query>
      <OrderBy>

      <FieldRef Name="ID"></FieldRef></OrderBy>
    </Query>
    <ParameterBindings>
      <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
      <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
    </ParameterBindings>
  </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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.