Site icon David Lozzi

Reusing Your Customized SharePoint Web Parts

Advertisements

Let’s say you have a sweet web part, it might be something cool with JavaScript, jQuery, or SPServices, a simple weather web part, a data view web part, or an image. Whatever you made (with some exception, keep reading), you can export your web part and copy it over to another page or site within SharePoint, or even to an entirely different SharePoint farm, to quickly reuse your master piece.

The process is straight forward, and applies to a few web parts. Unfortunately, the normal list view web parts (viewing lists and libraries in your site) are not exportable, and cannot be copied to another site or page. You’ll have to recreate those on each page. The common exportable web parts include the Content Editor, HTML Form, XML Viewer, Image Viewer and Page Viewer. Basically, anything that’s highly customizable.

Once you have your web part done and ready to be exported and copied to another location, you want to edit the web part (hit the web part menu at the top right). When it’s in edit mode, click the web part menu again and you’ll see the Export option.

Click Export. You will be prompted to download the file. The file name will assume the title of your web part, with a suffix of .dwp. Save this file onto your computer.

Your web part is now exported! If you plan on moving this to another site or farm, make sure you download any supporting files, like jQuery, SPServices, images, etc. which will be needed by the web part.

You have two options to reuse this exported web part.

  1. You can upload it and use it on a per need basis, per page/site as needed.
  2. You can upload it to the web part gallery and make it available across the site collection.

We’ll walk through both options.

First, if you want to use this per page/site:

You can repeat these same steps on each page or site you wish to use the web part on.

In some cases, you may want to use this web part across an entire site collection, giving power users and other admins the ability to use it at their discretion. This is just as simple as above.

Now when you go to edit a page and add a web part, you’ll see your new group on the left, which will contain your web part.

Happy SharePointing!

Exit mobile version