Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 2. Using and configuring Web Par... > Exporting and importing Web Parts - Pg. 49

Exporting and importing Web Parts 49 a page. All customized pages will have a blue icon in front of them so that you can iden- tify them. If you need to revert back to the original definition of the page, you can right- click or use the Ribbon button Reset To Site Definition to restore the original definition. If you reset a customized page, you'll lose all your customized settings. 2.6.6 Import and export of solutions using SharePoint Designer One of the most powerful features in SharePoint Designer 2010 is the ability to import and export information and solutions. If you're creating and configuring Web Parts using SharePoint Designer, you can export the configuration to a file, which you can then later add to the Web Part Gallery in the same site collection or on a totally differ- ent farm, and use it as long as the Web Part assembly is installed. SharePoint Designer also allows you to directly publish a configured Web Part to the local Web Part Gallery so that you can reuse the configuration within that site collection. Publishing the Web Part configurations to the gallery is a good way to reuse configured Web Parts such as the Content Query and XSLT List View Web Parts. You'll use the Ribbon to export Web Parts from SharePoint Designer. When you've selected a Web Part, the Format tab appears. This tab contains the group Save Web Part, which displays two buttons. The first button, To Site Gallery, saves the selected Web Part configuration to the local Web Part Gallery. The second button, To File, allows you to save the Web Parts control description file on your local drive. Note that for XSLT List View Web Parts the export buttons are located on the Web Part tab instead of the Format tab. You also have the ability to save a site or a list as templates for reuse, and you can export pages edited in SharePoint Designer so that you can include them in a Visual Studio 2010 SharePoint solution. NOTE SharePoint Designer 2010 is not a tool that you should equip all users with, because it has a lot of powers. If you make changes to, for instance, the master page and it fails, your whole site will fail. To secure your SharePoint environment, you can lock down SharePoint Designer using settings in the sites or the Central Administration tool. 2.7 Exporting and importing Web Parts When working with SharePoint, you most often have several environments, such as development, test, staging, and production, to secure and validate your implementa- tion. You start with building and configuring your Web Parts in the development envi- ronment before it moves to the test environment and so on. If you have a Web Part with a lot of configuration options and would like to move it into another environ- ment, you might find it hard to reconfigure the Web Part in the new site. Managing the Web Part configurations is especially important in application life cycle manage- ment scenarios when you're scripting your environments and configurations. In this section, you'll learn how to export and import a configured Web Part and how to prohibit users from exporting a Web Part. You'll find this information valuable