How to Re-use web parts 

Posted by Shariff, Lateef on June 3 2009

Here's the scenario..You have 50 sub-sites and you anticipate that they'll all be using the exact same web part. You are totally not feeling it...in other words..."geez, do i really have to go through 50 sub-sites and add a web part and define all the settings for each web part?" Yes and No.

Bad news: you will have to add the web part 50 times. :(

Good news: you will not have to define the settings for each web part. :-)    

the steps below are going to give you a huge break however: Quick note: although you can quickly add a web part once you've imported it in the gallery, the web parts are now independent of each other. so if you make a change to one web part, other web parts will not be impacted by that change.  

1. once you've created a web part, say a content editor web part, define all the settings in the side panel

 

 

   

2. Once you're finished. Click on the edit button and export the web part. For starters, save it to your desktop so you know where to go for it. As you start re-using web parts, you can create a separate folder for each project.

 

3. Once you've saved the web part to a desired location on your computer, go to Site Settings from the View all site content under the Top level site and under the Galleries section, click on Web Parts.

 

4. Then upload your web part. You can define a new group or simply save it under Default. (i suggest defining a new group so you can easily find it ;)

 

5. Go back to your sample site, click on Edit page, then add a web part to one of the zones and the Web Part Gallery should now display the web part under the new group name.

 

 

 

6. Click on the web part to add and wala...

 

you're done...easy does it charlie!

   

you're welcome! :-)

   

-Lateef

 
Tags:
0 Comments  |  Trackback Url  |  Link to this post | Bookmark this post with:        
 

Links to this post

Comments

Name:
URL:
Email:
Comments: