WCM – Save Site as Template

If you want to save a site as template in a SharePoint 2007 Internet Site you don't have that option in the Site Settings page, so you have to go to the "Save site as template" page by url.

To do that o need to add this to the url of you current site _layouts/savetmpl.aspx.

You can to this in the root site or in a sub site.

When you put that url in your web browser you are redirected to the following page.

Insert the name and title for the file and click on the OK button.

Now you have your site save as a template, to be possible to use this template you need to allow it, so you need to go Site Settings and click on the "Page layout and site template" under Look and Feel.

The template will appear on the left lisbox, choose and click on "Add >" then "Ok" button.

Now you can go to the Site Actions and Create Site.

Saving a site as template will have all pages and lists but no subsite.

DateTime SharePoint Field Format

When you are creating a SharePoint page layout and what to have a specific datetime format ex: Friday, 15 February 2008 it's not possible using just the publishing date field of SharePoint.

 But there is a very nice and clean trick:

Add a new calculated field to the content type that you are using on the page layout with the following formula:


In the date format you can put "dddd, d mmmm yyyy" or "mmmm d-mm-yyyy" …

On your page layout add the html code behind:

<PublishingWebControls:EditModePanel runat=server id="EditModePanel2">
      <SharePointWebControls:DateTimeField ID="DateTimeField1" FieldName="DataPublicacao" runat="server"></SharePointWebControls:DateTimeField>
<PublishingWebControls:EditModePanel runat=server id="EditModePanel3" PageDisplayMode="Display">
      <SharePointWebControls:CalculatedField ID="CalculatedField1" FieldName="CustomDateField" runat="server"></SharePointWebControls:CalculatedField>

This will show on edit mode the datefield and on display mode the calculated field. 

You can use this trick on any list to show on your views different date formats.