none
Multiple PublishingWebControls:RichHtmlField in a sinele Page?

    Question

  • Hi all

    According to our requirment , i need a template page contains three PublishingWebControls:RichHtmlField.

    If i put the control for three time in my page and save it. if i create a page using this , and give some differnt diffent articel in the three controls . But it shows all the controls contains the same  text...

    So how to differentiate the three controls in the same page.. otherwist it will be take it as all the three controls as one ... soplease help to solve this issue.. its very urgent for me...

    Friday, March 09, 2007 2:52 PM

Answers

  • I assume you have created your own Page Layout for this.

    What you first need to do is create a new content type with the three separate fields. Then create the page layout and link it to your content type.

    In the page layout you should then differentiate the 3 fields by specifying their unique name in Fieldname=""

    You are now probably referring 3 times to the same field name.

     

    Saturday, March 10, 2007 6:59 PM

All replies

  • I assume you have created your own Page Layout for this.

    What you first need to do is create a new content type with the three separate fields. Then create the page layout and link it to your content type.

    In the page layout you should then differentiate the 3 fields by specifying their unique name in Fieldname=""

    You are now probably referring 3 times to the same field name.

     

    Saturday, March 10, 2007 6:59 PM
  • Hi Katrien

    Thanks for ur reply. yea as u said i created the site columns using the HTMLContent filed , its created in my top level site , but when i design the pages using the sharepoint designer. the tools box doesnt show the fields that i created.. what was the Problem?  I thought that , our own htmlcontent create is not taken . But if i create any other contols means its showing in the tool box. but that htmlRichTextcontens was not showned in tool box. Please how to add this one into our page...

     

    Tuesday, March 20, 2007 4:40 AM
  • I have same issue, did you ever get this to work out?
    • Proposed as answer by Diganta Kumar Tuesday, June 16, 2009 3:30 AM
    Friday, May 01, 2009 6:44 PM
  • This is how you would do this for SharePoint 2010.

    Go to Site Content Types, and create a new content type. Use one of the Publishing Page content types as the parent (base) content types, such as Article Page. Then once, you've created the new content type, and see it listed in Site Content Types, click to edit it. Then add a new column, name it, and set its type to:

    "Full HTML content with formatting and constraints for publishing"

    Once you've finished, and see the new column listed on the Content Type page, click it and on the page that opens, find the Field ID in the URL of the location bar. It should be at the end of the URL and look like this: &Fid={300fa8b4-117a-41e3-96b5-8753e9680be6}

    Copy the guid (bolded). This is your FieldName for the second RichHTMLField control you put on your page layout in Designer.

    <PublishingWebControls:RichHtmlField FieldName="300fa8b4-117a-41e3-96b5-8753e9680be6" runat="server" id="RichHtmlField"></PublishingWebControls:RichHtmlField>

    Once you set the FieldName attribute to the new Field ID from your new content type, Designer will also pick up the column name you set on your new content type.

    Last step, is to find the Page Layout in its gallery in the SharePoint UI, and edit its properties. That way you can associate your page layout with the new content type, and you're done.

    Friday, March 02, 2012 6:38 PM
  • Can you clean this up a bit? I have done the same steps but haven't been able to get this to work Mr. Greaves. I might be missing a step but I get System.InvalidCastException: Unable to cast object as the error.
    Tuesday, November 06, 2012 8:15 PM
  • Hi Andrew,

    This is working fine in edit mode of the page and its showing the options of rich html. But in display mode this control is showing the html tags . Did you ever work to get this thing.?


    Thanks

    Purna

    Wednesday, July 24, 2013 7:18 AM