Everything SharePoint and XAML

My continuous learning of SharePoint, XAML, Silverlight, Windows Phone 7, Windows 8, Office, VSTO, C#…

Save Steps, Export that Web Part!

Posted by Steve Pietrek on March 31, 2008

I was working with a client last week on some content they want to display in a certain format. The content medium will be used across the site and will be used multiple times.

After spending time creating the content, the client (who isn’t very knowledgeable in HTML) but comfortable enough with how SharePoint works, clicked the Source Editor button, selected all the markup, and copied the content to the clipboard. He then added another CEWP, edited the Web Part, click the Source Editor butotn, and pasted the markup. He was now able to go into the Rich Text Editor and make the required changes.

Great! Then I asked him if he wanted to reduce the steps significantly. He was all for that!

I explained the process of exporting a Web Part and importing it so it can be reused. Below are the steps:

  1. Edit the Page.
  2. Setup the existing Web Part the way you want your new Web Parts to work when they are added to a page. One example for this particular CEWP is to set “None” for the Chrome Type. I would also suggest setting a good title (even though it is not displayed on the screen because it will be used as the export name) and a description. 
  3. From the Web Part’s edit menu, select the Export option. Click the Save button and save it to the desired location.
  4. The Web Part will be saved as a DWP file. You can open the DWP file in a simple editor such as NotePad++ if you want. This is another way to set the description if you didn’t earlier in step #2.
  5. Now the Web Part is exported, it is time to import it.
  6. Select “Site Actions” >> “Site Settings” >> “Modify All Site Settings”.
  7. Click the “Web Parts” link in the Galleries group.
  8. Click the “Upload” button.
  9. Click the “Browse” button and navigate to the location where you saved the exported Web Part in step #3 above. Click the OK button.
  10. Specify a title and description (should default in) and, to make it easier for end-users to find the Web Part, in the Group section, check the “Specify your own value” option and type in a group name (e.g. CSG Web Parts). Check any Quick Add Groups options. Click the OK button.
  11. Once the Web Part is imported, time to add it to a page. Navigate to a page, edit the page, click the “Add a Web Part” link in a Web Part zone, select the Web Part, and add it to the page.

One Response to “Save Steps, Export that Web Part!”

  1. FilterZen How To: Create and Set Up Web Parts Programmatically…

    We’ve quietly launched the newest release of FilterZen yesterday — without much fanfare yet, until this web site has been completely updated content-wise — a f ……

Sorry, the comment form is closed at this time.

%d bloggers like this: