Prexens team dev' corner

How-to: insert a Data View Web Part in a WCM publication page

Goal of this post
This post guides you through the steps for inserting the famous DVWP, which is an exclusive part of SharePoint Designer, in a publishing page of a WCM site.

Problematic overview
As a reminder, when trying to open a publishing page with SharePoint Designer, the following message box appears:
 

Edit in browser

Because we can't open the page in SharePoint Designer, we cannot configure and add the DVWP…

Solution
SharePoint Designer contains a very handy feature for WCM scenarios: " Detach from Page Layout ". This will break the inheritance between the publishing content page and its page layout.

First, start by duplicating the publishing page:
 

Duplicate page


Right click on the copied page and select " Detach from Page Layout ": this will embed the layout in the content page.
We can now open the content page as a standard " collaborative " page, configure and insert our Data View Web Part:
 

Configure Data View Web Part


Once you've configured the Web Part, you can export it from the browser interface…
 

Export Web Part


… then re-import it in the SharePoint Web Part Gallery:
 

Upload to Web Part Gallery


You can now open the target content page again, and insert your custom DVWP directly in a Web Part zone.

Tip: we recommend you to keep the duplicated page in the library for further modifications!

Comments

No comments yet for this post.

Add a new comment

Please sign-in to add a new comment
Categories
Links
  Prexens Web Site
  Charting for SharePoint
  Charting for SharePoint (Codeplex)
  Charting for SharePoint Starter kit

Microsoft Certified Partner