SharePoint 2010 - RichImageField does not appear in display mode

I am currently researching SharePoint page layouts and building pages based on those layouts.

I currently have a page layout containing multiple RichImageFields and RichHtmlFields, but it seems that the first RichImageField is not displaying (not even displaying anything). As far as I can see it is the same as the others:

    <div id="headerImage">
        <PublishingWebControls:RichImageField id="HeaderImage" FieldName="HeaderImage1" runat="server"/>
    </div>
    <div id="middleContent">
        <div id="left">
            <div id="about">
                <fieldset>
                    <legend>About</legend>
                    <PublishingWebControls:RichHtmlField ID="About" FieldName="AboutMedicInfo1" runat="server"/>
                </fieldset>
            </div>
            <div id="items">
                <h1>
                <SharePointWebControls:FieldValue FieldName="ItemsTitle1" runat="server"/></h1>
                <PublishingWebControls:EditModePanel runat="server" CssClass="edit-mode-panel">
                    <SharePointWebControls:TextField runat="server" FieldName="ItemsTitle1" />
                </PublishingWebControls:EditModePanel>
                <div id="Item1">
                    <fieldset>
                        <legend>
                        <SharePointWebControls:FieldValue FieldName="Item11" runat="server"/></legend>
                        <PublishingWebControls:EditModePanel runat="server" CssClass="edit-mode-panel">
                            <SharePointWebControls:TextField runat="server" FieldName="Item11" />
                        </PublishingWebControls:EditModePanel>
                        <PublishingWebControls:RichHtmlField ID="Item1" FieldName="Item1Content1" runat="server"/>
                    </fieldset>
                </div>
                <div id="Item2">
                    <fieldset>
                        <legend>
                        <SharePointWebControls:FieldValue FieldName="Item21" runat="server"/></legend>
                        <PublishingWebControls:EditModePanel runat="server" CssClass="edit-mode-panel">
                            <SharePointWebControls:TextField runat="server" FieldName="Item21" />
                        </PublishingWebControls:EditModePanel>
                        <PublishingWebControls:RichHtmlField ID="Item2" FieldName="Item2Content1" runat="server"/>
                    </fieldset>
                </div>
            </div>
        </div>
        <div id="center">
            <div>
                <PublishingWebControls:RichImageField id="HighLight1" FieldName="HighLight11" runat="server"/></div>
            <div>
                <PublishingWebControls:RichImageField id="HighLight2" FieldName="HighLight22" runat="server"/></div>
            <div>
                <PublishingWebControls:RichImageField id="HighLight3" FieldName="HighLight32" runat="server"/></div>
        </div>
        <div id="right">
            <div id="report">
                <PublishingWebControls:RichHtmlField ID="Report" FieldName="Report" runat="server"/>
            </div>
            <div id="webparts">
                <WebPartPages:WebPartZone runat="server" Title="Rechtsonder" ID="BottomRightControl"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone></div>
        </div>
    </div>
</div>

      

The funny thing is that I can see the image perfectly when I am in edit mode and when I view the page library items (after I added the said field to the view).

Does anyone have any experience? Feel free to ask additional questions if I may be unclear.

+3


source to share


2 answers


Ok, I should have checked before posting my original question. It turned out that my problem was due to the fact that I was using the page content type, not the page type or welcome page page. There is no field in CT CT that the image was looking for.

What I'm really interested in is that it still allows me to select an image and it stores the value somewhere ... even though there was no official field for it. I suspect there is a field in the library since you will need it for other types of content.



Anyway, hoping someone else finds it useful.

+3


source


Make sure you don't miss two properties RichText="TRUE"

and RichTextMode="FullHtml"

definitions of the image field:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">  
  <Field
     ID="{4ea31e74-f59d-4ddf-863c-607a01735f65}"
     Name="pls_H2_2_Image"
     DisplayName="Titel 2 Bild"
     Type="Image"
     Required="FALSE"
     RichText="TRUE"
     RichTextMode="FullHtml"
     Group="Custom">
  </Field>
</Elements>

      



I ran into this problem before and this solution did it right.

0


source







All Articles