Rich HTML Field in Custom Content Type Won't Display Webparts

I've created a custom content type which inherits from the Article Page parent content type.  It contains four fields, all of the Rich HTML control type.  These fields are part of a custom page layout.  Here is the markup for the fields (only including one):

<Field ID="{E37B4E40-8DDB-4843-9B16-670069EB0DEB}" Name="TopLeftContent" DisplayName="TopLeftContent" Type="HTML" Required="FALSE" Group="Custom Columns" RichText="TRUE" RichTextMode="FullHtml" Sealed="FALSE"></Field>

The fields show up just fine in the page layout, and I'm able to add HTML to them when the page is in edit mode.  But there is one strange behavior that I can't figure out: they won't display web parts.  For instance, I tried to insert a content rollup web part in one of the Rich HTML fields.  If I look at the actual HTML, it acts like the web part has been added; there are a couple of divs in there that look consistent to web part code.  But the web part doesn't show up on the page at all.  

I created a Rich HTML field through the SharePoint UI and added it to a test page layout, and went through the same test, and the web part showed up.  I'd like to be able to keep these custom fields in a solution so I can deploy as a wsp.  Does anyone know what might be causing this behavior?  Thanks.

March 31st, 2014 6:11pm

Hi,

Would you mind providing more details about how you build this solution?

I would suggest you check that whether the steps you taken to create the solution is properly.

Here is a link about creating custom content type and page layout for your reference:

http://www.rkinteractive.com/blogs/SoftwareDevelopment/post/2012/01/06/Creating-Custom-Content-Types-and-Page-Layouts-in-Visual-Studio-2010.aspx

Another link about Using Rich HTML Field Controls:

http://msdn.microsoft.com/en-us/library/ff647220.aspx

Thanks

Patrick Liang

Forum Support

Please remember to mark the replies as answers if they
help and unmark them if they provide no help. If you have feedback for TechNet
Subscriber Support, contact
tnmff@microsoft.com


Free Windows Admin Tool Kit Click here and download it now
April 1st, 2014 7:26am

Yes, I built it the same way as the article above describes.  I add the content type, then the fields and deploy it without any issue.  And the fields will accept HTML code.  The only issue is the web parts.
April 1st, 2014 12:47pm

Was this ever resolved? 

My custom visual web parts are displaying in Web Part zones, but also won't display within the Rich Content boxes on a publishing Page in SharePoint 2013.  Microsoft's out of the box web parts are displaying in the Rich Content zones. 

Free Windows Admin Tool Kit Click here and download it now
August 14th, 2015 9:55am

Hi,

Please try below code to create custom field for rich text type and then add WebPart into it.

<Field ID="{E37B4E40-8DDB-4843-9B16-670069EB0DEB}" Name="TopLeftContent" DisplayName="TopLeftContent" Type="Note" Required="FALSE" Group="Custom Columns" RichText="TRUE" RichTextMode="FullHtml" Sealed="FALSE"></Field>

I have changed type from "HTML" to "Note".

Try this and let me know the result.

August 14th, 2015 10:32am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics