24.1. Importing and Exporting SharePoint Sites

As in the case of non-SharePoint sites, you can import files and folders into SharePoint sites via the Import dialog box. You can also use the Import Web Site Wizard to import files and folders from remote Web site locations into the SharePoint site. The user interface is similar to the one discussed in the previous chapter and is omitted here in favor of other details.

NOTE

When importing content into SharePoint sites from a remote Web site location using FPSE, FTP, WebDAV, etc., the SharePoint Designer interface allows you to move content from the SharePoint site to the remote Web site location. While you can use this interface to move static content, such as HTML pages, pictures, CSS files, etc., any SharePoint-specific content, such as Web part pages, page layouts, etc., shouldn't be moved in this manner.

24.1.1. Exporting Web packages

A better way of moving content between SharePoint sites is to use the Personal Web Packages feature. The user interface for importing and exporting SharePoint sites is essentially the same as for non-SharePoint sites. However, for SharePoint sites, it's important to keep the following points in mind when using the Personal Web Packages feature to export content:

  • You should use personal Web packages when you want to use the design and customization of the Web pages, lists, etc., for the SharePoint site at a different location.

  • Personal Web packages don't include data associated with SharePoint lists. Also, you can't include subsites and user permissions in the personal Web packages.

  • Web packages are useful in special cases when you want to move a specific Web page from one site to another without backing up and restoring the entire Web site.

Many lists inside a SharePoint Web site might contain sensitive information, such as confidential documents, user passwords, etc. For protection, you should ensure that these files aren't included in the Web packages. For example, if you've created database connections (stored in the hidden _fpdatasources document library) by using the Data Source Catalog task pane, you might want to exclude them.


The other important thing to consider when using the import/export features of SharePoint Designer is that the destination SharePoint site should be the same version as the source SharePoint site. To avoid mismatches, it's recommended that you use the same site template for the source and destination Web sites. For example, if you're using the Team Site template on the source site, the destination site should also use the Team Site template. You shouldn't import content from a Team Site template–based SharePoint site into a Collaboration template–based SharePoint site.

24.1.2. Using SharePoint site templates

SharePoint site templates allow you to save the structure of the SharePoint site you designed in SharePoint Designer so that new Web sites can reuse the same structure. You should save your Web site as a site template when you want to create new Web sites based on the same layout, look and feel, and customizations.

Choose File Export SharePoint Site Template to open the SharePoint administration Save Site as Template Web page, as shown in Figure 24.1, which allows you to save the site as a template (a file with an .stp extension) for later use.

NOTE

You can click the Include Content check box if you want to include content along with the Web site structure. If you include content, any custom workflows designed with SharePoint Designer are also included in the template. However, keep in mind that there's a limit of 10MB for the size of the template file.

Figure 24.1. The Save Site as Template Web page in SharePoint Designer

The template file that's created when you save the site as a template is stored in the Site Template Gallery. You need to ensure that you have appropriate permissions to the Site Template Gallery so that you can save the template to the gallery.

24.1.3. Exporting Web parts

One of the really cool features that SharePoint Designer offers is the ability to export Web parts existing on Web pages of a SharePoint Web site, which can then be saved into the Web Part Gallery of the Web site in SharePoint and used on other Web pages. The process of exporting a Web part is simple. Follow these steps:

  1. Open the Web page that has the Web part that you want to import.

  2. Choose the Web part you want to save and then choose File Export Save Web Part. You have the choice to either save the Web part in the Site Gallery or as a file with the extension .dwp (or .Webpart). This allows you to later add the part to the Web Part Gallery of a SharePoint Web site. When you choose to the save the Web part in the Site Gallery, the Save Web Part to Site Gallery dialog box, as shown in Figure 24.2, opens. This dialog box allows you to specify the display name and description of the Web part that's used in the Web Parts task pane.

    Figure 24.2. The Save Web Part to Site Gallery dialog box
  3. Click OK. The newly saved Web part is listed in the Web Parts task pane. When you save the Web part, SharePoint Designer automatically opens the Web Parts task pane to show you where the Web part is saved.

NOTE

Although you can use this mechanism to save Web parts for later use, it's important to understand that the dependencies of the Web part aren't saved along with the file. For example, if you save a Data Form Web Part by using this option, you must ensure that the database connection that the Web part uses is valid on the Web site where the saved Web part is used.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.62.168