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

Is it possible to add a web part on every page of a subsite automatically? Can the web part use the same config as the other pages it is one?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

With custom code you could iterate over all the (sub)sites and pages and add it programmatic. Some handy work is needed. In this option you can set all the properties you want when adding the webpart to a page. Each page has is own unique config settings.

An other option is to add the webpart to the masterpage. Each page using the edited masterpage would show the webpart. Adding a webpart to a masterpage can be tricky (I haven't done it myself, and I don't know how the settings are stored/set in this scenario).

share|improve this answer
1  
Please note that with 1st approach you have to support automatic addition of the webpart to all newly created pages (item receiver?); with 2nd approach you will lost personalization support of static web parts (they'll behave as web controls) –  Ivan Padabed Oct 10 '11 at 13:16
    
@IvanPadabed Good points! –  Dribbel Oct 10 '11 at 13:28

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.