SPS Area Templates

And, to close of the day's rants - an instructive post.

Today: How to create a template of a Sharepoint Area that can be moved or taken to different servers.

Unfortunately, SPS Areas can't be bundled into STP templates like WSS sites or lists, and there's no built-in method of exporting an area into a convenient format so out Frontpage customizations and painstakingly defined layout can be copied to a different site.

What we CAN do, though, is simply edit the area in question using FrontPage 2003 and File->Save As to save the ASPX to our local drive. Any locally-referenced images will also be downloaded. This ASPX can now be copied to a different server and serve as a template, using these steps:  (Warning: My Sharepoint installation is in Hebrew, so some of my translated links and steps might be a bit off).

1) Copy the ASPX and any dependent files into a Document Library on the new SPS server. The ASPX must reside inside Sharepoint, probably for security reasons. I got strange errors when trying to put the file in the /_layouts directory, so I'll stick to this method until proven wrong.

2) Create an area that will use our template, or modify an existing one (warning: The current content of the area will be unavailable once we attach the template).

3) Go to Change Settings (on the left) -> choose the Page tab ->  Area Templates -> This area uses the following page as a template.

4) Specify the virtual path to our ASPX template - I put it in the main portal's Document Library, so the path was:
/Document%20Library/template.aspx

5) Press OK, and your area is now based off of that page. The original content is unavailable but not erased - if you change the Area Templates radio-button back to what it was, you'll get the old page back.

There. Enjoy.

No Comments