Hot answers tagged site-template
11
A Site Template is essentially a WebTemplate, just pre-packaged. It's NOT a Site Definition.
If you would like to distribute it "globally" in your farm, crack the WSP open and edit the Feature and set the scope to Farm (instead of Site). (Quck and dirty solution)
Even better is to crate a Web Template of your own and copy and paste pieces from the Site ...
9
Actually there is, but it seems to be something of a secret that not many people have noticed. Simply view the HTML source of the page and search for 'g_wsaSiteTemplateId' - this will give you the site template and configuration used to create the site.
So when I look at it on my SP2010 My Site, I see:
var g_presenceEnabled = true;
var g_wsaEnabled = ...
9
Unfortunately it is not possible to change the site template after you create the site. In some cases you can manually change things to make something look like something else, but the underlying site will still be based off of the original site template.
If you chose a Document Center and don't like it and want to switch to a Team Site template you will ...
6
By using Powershell:
add-pssnapin "Microsoft.SharePoint.PowerShell"
$s = get-spsite "http://localhost"
#this will resolve the name
$name = $s.RootWeb.WebTemplate
#this will resolve the id
$id = $s.RootWeb.Configuration
#this will give you the template for the specified language
$template = $s.RootWeb.GetAvailableWebTemplates(1033)[$name + "#" + $id]
6
You can import your WSP into Visual Studio, using special project type, "Import SharePoint Solution Package":
Microsoft provides walkthrough on how to do this:
http://msdn.microsoft.com/en-us/library/ee231603.aspx
And what about web templates, I recommend you to check out this awesome post from @Chris Beckett:
...
6
The most highly praised, probably the most widely used, and personally my favourite SharePoint dev tool ever created is possibly your best solution to this.
WSPBuilder: http://wspbuilder.codeplex.com/
You'd need to reorganise your folder structure of the WSP into what WSPbuilder expects, but this is probably your fastest way to do this.
We have recreated ...
5
The SharePoint 2010 site template has two functions. Firstly to replace the old .stp files from MOSS which were used to create new sites from a template (and did not support publishing sites). Secondly as a starting point for development by importing them into Visual Studio.
They seem to do the first job adequately, at least as well as the old .stp files. ...
4
Hey Marc,
I reproduced the error. It's because of the Blank Site definition you have used as a top level site collection. Default it will not activate all features (like the theming one, but also it will cause problems for the Term Store Manager to appear). My advise for the future, don't use the Blank Team site as top level site collection as your first ...
4
You are right about that PowerShell caches alot.
You can get around this by spawning new processes that executes the code
For example
$shell = Start-Process Powershell .\test.ps1 -PassThru -Verb runas
will spawn a new process that is run as administrator (-Verb runas) and traces the process (-PassThru) giving you the possibility to track exit codes and ...
4
Ok there are a few ways to do it:
"Save as template" and include content (The amount of content is limited but should be enough in most cases)
Database backup/restore as PirateEric wrote
Granular backup in the CA (To find in Backup and Restore / Granular Backup) You can then select a site or List and export it. It can include the permissions but I am not ...
4
Setup a content deployment job.
Do a Backup-SPSite, Restore-SPSite
Use the content deployment wizard tool (Neeed to install this on both servers for export, import)
Database detach and reattach.
(4) is laborious and it also seems to retain webapp urls as-is. So you will see http://test urls in your content after you move to prod. I'd do #2 or #3 (if you ...
4
Are you running SharePoint 2010? If so, you can include your scripts using a feature: it is now possible to have a CustomAction with ScriptLink as a location. This will leave the masterpage unmodified while at the same time making jQuery (and any other scripts you need) available across the entire site collection. More information is in Deploying and Using ...
4
There are some ways to do this with custom content types, possibly even building on the Discussion Boards that are out of the box in SharePoint, but if you are looking for something that might be able to be implemented quickly I would look at the SharePoint Forums from Lightning Tools. http://lightningtools.com/
4
There are (at least) three ways of achieving this in SharePoint 2010.
1) Custom Site Definition. They are hard-core and somewhat old-school, and require access to the file system. Generally we try to avoid these nowadays, other than as a simple one to be used for feature stapling.
2) Site Template. Now a realistic option because of the new Web Template ...
4
I can't say I've tried this myself, but I would expect this to work.
First, take a backup of your .stp-file. Rename the file from .stp to .cab. Find the Elements.xml-file that deploys the list template (probably there's only one Elements.xml here). In the Elements.xml file, change (or add if it doesn't exist) the "Group"-property (or perhaps ...
4
You can find the correct template and use it in code like this (templateName is the title of your saved template, locale is the locale ID of the template):
// Find correct template
SPWebTemplateCollection templates =
SPContext.Current.Site.GetWebTemplates(Convert.ToUInt32(locale)); // or GetAvailableWebTemplates or GetCustomWebTemplates
SPWebTemplate ...
4
rjcup,
Your client is likely not the right entity to ask what solution is best. If you're the developer, then you should know best and if your client doesn't trust your judgement, then your client has a problem much greater than how to get something done. If that client knows more about SharePoint than you do, then you have a quite different problem as ...
4
Yes; you can totally accomplish what you wish without a deep knowledge of TFS. I will provide some tips that I hope will save you a lot of time without looking through all the MS documentation and you might even consider a different route after you read this...
First, know that there is a customizable set of files that comprise a Process Template; a ...
4
You can change the order or pick the web templates you wan to be shown in the create list.
Go to "Site Actions" -> "Site Settings" -> under "Look and Feel" choose "Page layouts and site templates". in the Subsite Templates choose "Subsites can only use the following site templates" and pick and order your web templates
3
Creating a template from Publishing sites is not supported as the templating function relies heavily on content types and other items that may not be available when you create a new site from the template.
Like you I've tried the workaround from 2007 by navigating directly to the Template creation page, which does work, but I've never succeeded in then ...
3
D'oh. Finally figured out why it wasn't showing up.
http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/7f7641de-495f-4688-a4a9-203c780bcea8
Under Site Settings -> Look and Feel -> Page layouts and site templates you need to add the template. Not sure how come these were missing...
3
That's a nice writeup, but you missed two options:
Create a Site template from an existing site: http://whitepages.unlimitedviz.com/2010/10/how-to-build-a-site-collection-template-from-a-web-template-in-sharepoint-2010/
Create a webtemplate
If you want to go with a "nocode solution" I would go for option 1, but I have to admit that I don't have any ...
3
A warning doesn't mean that you did something wrong.
As far as I know there is no recommendation from Microsoft. There are many ways to add a script to a page, and your choice will depend on your specific use case and personal preferences.
Do you need jQuery on many pages? Then you may want to include it in a custom Master page. Do you need it on just one ...
3
I evaluated lightning tools and Bamboo discussion boards plus. I am not a big fan of Lightning tools solution, but I do like discussion boards plus:
https://store.bamboosolutions.com/pfi-211-discussion-board-plus-for-sharepoint.aspx
Specifically, they build Q & A into the SharePoint discussion board functionality and have things like "Suggest as ...
3
Save Site as Template: Why is the “include content” section available for some sites but not others?
Here you have a list of what is included and what is not included when saving site as template:
Save a SharePoint site as a template
NOT INCLUDED IN USER SOLUTION WSP
Publishing pages and publishing sites
And Enterprise Wiki is publishing template:
Sites and site collections overview
Template Enterprise Wiki
Purpose ...
3
There are no official statements on the structure in the WSP's generated from saving a site as template and it is for sure not a template that you should reuse or build on. IMO it's a really messy export that is hard to understand and maintain. (Some sources says it's a best practice to work on the exported WSP, but it definatley is not!)
I do recommend ...
3
The LCID number is wrong (the fourth parameter), it should be one of this list instead than 123:
http://msdn.microsoft.com/es-es/goglobal/bb964664.aspx
The US-English is 1033.
Remember also that if you try to create sites with a non administrator user you should use RunWithElevatedPrivileges method.
3
I haven't tested this, but I would think you can add it with a javascript maybe. You already have the _spPageContextInfo on your sites.
<script type="text/javascript">
document.write('<a href=\"'+_spPageContextInfo.webServerRelativeUrl+'/page.aspx\">link</a>');
</script>
That's just an example, probably not the best way to add js ...
3
As each my "mysite" is a new site collection using a Microsoft Site Definition, there is no no-code solution for automatically adding web parts to a page. (Well there is one no-code solution: Someone could sit in central administration add refresh the list of "mysites" and when he sees a new one he could log in and add the web parts, but I think that after a ...
3
You need to create manifest.xml:
<?xml version="1.0"?>
<Solution SolutionId="876a627d-7944-4c3e-a17f-d347e9234517" xmlns="http://schemas.microsoft.com/sharepoint/">
<SiteDefinitionManifests>
<SiteDefinitionManifest Location="MySiteDef">
<WebTempFile Location="1033\XML\webtempMySiteDef.xml" />
...
Only top voted, non community-wiki answers of a minimum length are eligible

