Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've built a WebPart for a SharePoint 2010 site. I need to add it to one of its master pages (using SharePoint Designer), and when I select it from the WebParts menu I click it but I don't see it added on the design page...

Could you please tell me how to do it?

Thanks in advance!

Brian

share|improve this question
add comment

1 Answer

Adding Web Parts to masterpages is not possible directly since you cannot add a webpart zone either to a master page. If you add Web Parts without a Web Part zone aka static Web Parts, you don’t get any Web Part benefits from it–they act like any other control.

One way of tweaking this would be by adding a custom (empty) contentplaceholderid. It can be created in the master page which can then be utilized by page layouts to insert the part.

Steps in SharePoint Designer 2010

  1. Add a uniquely named content placeholder in your custom master page example:

<asp:ContentPlaceHolder id="PlaceHolderCopyright" runat="server"/>

  1. Within a page layout insert custom content for the placeholder <asp:Content ContentPlaceholderID="PlaceHolderCopyright" runat="server"></asp:Content>

  2. Insert a web part using designer into the newly created area. If the same part is to appear across all pages using the layout, do not use a web part zone, simply insert the part directly into the area.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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