Feature
folder: C:\Program Files\Common Files\Microsoft
Shared\web server extensions\12\TEMPLATE\FEATURES\Publishing
Feature
file: PublishingSiteSettings.xml
Definition:
<HideCustomAction
Id="HideSaveAsTemplate"
HideActionId="SaveAsTemplate"
GroupId="Customization"
Location="Microsoft.SharePoint.SiteSettings" />
Notice the use of the HideCustomAction
tag, with the corresponding HideActionld “SaveAsTemplate”.
Why is the “Save site as template” menu
option removed from publishing sites?
Many of my customers use publishing
sites. A lot of them tried to use the save as template option (some using code,
some using a feature like the one below) and we all came to the same
conclusion:
Since publishing sites have pages in
them and layouts that are all connected to a content type that is configured at
the top level site of the site collection, and because these content types are
not saved and moved within the site template STP file – the STP file not, as one
would expect it to be, a true reflection of the original site.
This means that if you save a
publishing site as template and use it in the same site collection, providing
all site content types it uses remain unchanged, the site template will work
properly.
The problem arises when you try to move
the site template to a different site collection, or when you've changed or
deleted some content types in your current site collection – this will result in
unexpected behaviour (that from my experience is irritating but fixable, with
some work).
So, if you want to use the site
templates within the same site collection, or if you use only the out of the box
content types (welcome and article) with no changes, you should have no
difficulties.
How do I add the “Save site as template”
option back to publishing sites?
Here is what you need to do to add this
option back to your publishing site. It's very simple; it will take
approximately five minutes of work!
Simply create, install and activate a
feature that will bring this menu option back to life!
Create feature
Create a feature that re-register a
“save as template” action to site settings. I said 5 minutes, right? So here is
a feature ready to
use - http://www.kwizcom.com/DownloadFile.asp?Id=1164 (it's my free gift to you!)
Save the folder inside the ZIP file,
under your server’s features folder.
Install Feature
Run STSADM command:
“C:\Program Files\Common Files\Microsoft
Shared\web server extensions\12\BIN\stsadm” -o installfeature -name
AddSaveTemplateToPublishingSiteSettings –force
Activate Feature
After installation, you should have
this new site collection feature:
Result
If you did everything correctly, your
new publishing site settings “Look and Feel” section will appear like
this:
|