4

I am working on a page layout, and this is what I have ...

<!-- Title -->
<SharePointWebControls:TextField FieldName="Title" runat="server" ID="Title" CssClass="emedia-spwc-global"></SharePointWebControls:TextField>

The field displays and edits no problem. But it is just a text field. How do I tell the control I want it to be displayed with in H1 tags with out wrapping the entire control in H1 tags.

Thanks

Mike

7

Use an EditModePanel to display two different controls when editing and displaying:

<PublishingWebControls:EditModePanel runat=server PageDisplayMode="Edit">
    <SharePointWebControls:TextField FieldName="Title" CssClass="emedia-spwc-global" runat="server" />
</PublishingWebControls:EditModePanel>

<PublishingWebControls:EditModePanel runat=server PageDisplayMode="Display">
    <h1>
        <SharePointWebControls:FieldValue FieldName="Title" CssClass="emedia-spwc-global" runat="server" />
    </h1>
</PublishingWebControls:EditModePanel>
  • Wow again Whitelaw! That was perfect! Thanks ... again – mdumka Nov 10 '12 at 4:44

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.