Tag Info

Hot answers tagged

12

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 ...


11

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 = ...


10

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 ...


6

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 ...


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. ...


5

Web Template: Web template refers to new feature element available in SharePoint 2010, which provides us flexible way to define definition (onet.xml file), which will be used only on provisioning time, when the site is created. There are no references to the definition on runtime, which provide easy maintainability for the definition. Source ...


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

Just a try : replace the Lookup Column definition with this one : <Field ID="{2FF1B484-6D70-449c-8E5C-904E4D5971E1}" Name="PageCategory" Group="Intranet Columns" Type="Lookup" DisplayName="PageCategory" List="Lists/Categories" ShowField="Title" PrependId="TRUE" Overwrite="TRUE" /> Doesn't know why, ...


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 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 ...


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

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 ...


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


4

If your final goal is migration to SharePoint Online (SPOL) you definately need to think this into your branding approach. WebTemplates were our choice for SharePoint 2010 on-premises solutions, since they have a much better upgrade story than custom site definitions. We have also long ago dropped the declarative approach for other artifacts and for ...


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

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

Unfortunately exporting site templates works far from perfectly... It is more than likely that this is per design, as i have discovered several other caveats with this functionality. The most annoying being that export does not work with Publishing sites (i know you can hack around this, but the fact stays that it is not supported and probably for good ...


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

As Marc D Anderson stated, you can add script references in various ways. If you want to add JavaScript code on a single page, you can indeed use a Content Editor webpart, but I really like the solution of creating a feature and use delegate controls to add the JavaScript code to your page layouts. That way, you don't have to customize any page layouts. ...



Only top voted, non community-wiki answers of a minimum length are eligible