Converting SharePoint WebPart HTML tables into DIVs

Just wanted to make a quick post on this matter for those who might be fighting with this issue. There is a great link on the code that needs to be implemented here. Follow this by creating into your project the following control adapters.

Removing Web Parts tables in SharePoint 2010

What is missing from the post is where to apply the adapter and against what.

What you need to do is to implement a code(or do it manually) that adds to your IIS webapplication compat.browser file new adapters.

Sample file path: C:\inetpub\wwwroot\wss\VirtualDirectories\”your app name”\App_Browsers

The control adapters need to be applied to the following control types: 

System.Web.UI.WebControls.WebParts.WebPartZone

Microsoft.SharePoint.Publishing.WebControls.RichHtmlField

Add the your configs to the controlAdapters XML element. the following:

<adapter controlType=”System.Web.UI.WebControls.WebParts.WebPartZone”
adapterType=”your class reference, your assembly name, Version=1.0.0.0, Culture=neutral, PublicKeyToken=publickeytoken” />
<adapter controlType=”Microsoft.SharePoint.Publishing.WebControls.RichHtmlField”
adapterType=”your class reference, your assembly name, Version=1.0.0.0, Culture=neutral, PublicKeyToken=publickeytoken” />

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s