Give the template a file name, name, and if desired, a description. Select Site Settings, and click Save Site As Template – It’s under the Site Actions section. Once you have your site looking and behaving the way that you want, it’s time to save it off. I will now attempt to describe the relevant steps, and a few gotchas to do this.
The good news is that you can import a WSP file directly into Visual Studio 2010, edit it, and create a new solution that does work. The main reason is that the actual web template is scoped to “web” and for it to show up for site collections, it needs to be scoped for the farm. The solution will actually install, but your site template won’t show up. That should be easy,right? Just save off the WSP file, add the solution to the farm with either PowerShell or STSADM. WSP solutions in the user solution gallery. However, in SharePoint 2010, site templates are no longer.
This was relatively straightforward in SharePoint 2007, you would save a particular site as a template, then go to the template gallery, download it to the file system on a front end server, and then run an STSADM command to have it added to the Site definitions list. Todd has a very clever solution to getting your web template to be used at the root site, but I recently had a requirement to have it fully automated, and to be visible to the templates available when creating a site collection in Central admin. This whole process is actually decoupled in SharePoint 2010, and you no longer need to select a template when the site collection is created ( as documented previously by Todd Klindt). What happens when a new site collection is created is that the collection gets created, and then a web template is applied to the root site. Repeat this process for all your views.First off, I should state that there’s really no such thing as a site collection template. Delete the view you have just replicated.ħ. Rename your view to the original name, and choose OKĦ. (You can easily see which view to do first as you have numbered them)ĥ. Select the appropriate view from the “Start from an existing view” section. Rename each view to include the number of its desired position in the list (This makes it easier to re-create them in the right order and saves you from renaming the new views later)Ĥ. Take a look at your views and decide what order you’d like.Ģ.
And in my opinion, quicker and much less fiddly than tweaking the SQL Server table directly. Just take a look at my step-by-step below, to see for yourself how painless this is compared to creating each new view from scratch. It is in fact much less painful than it sounds and will only take a few minutes (depending on the number of views you have), by using the “Start from an existing View” option. The prospect of doing them all again fills you with dread! OK, this sounds like an awful suggestion, when you’ve spent ages getting them just right. Simply re-create your views in the order you want them to appear.
That’s far too troublesome (have to get view name, direct access to SQL Server, write your SQL update script, etc) for me to worry with when there is a simpler solution. There’s the techy way … alter the created date of your views directly in the SQL Server database table that holds your views.
I’m sure Microsoft will sort this out soon, but in the meantime, there are ways to get round it. Unfortunately there is currently no automatic way of sorting views, much to my disgust! They will currently only appear in the order they were created. So you’ve created some great views for your document library or custom list, and now you’d like to be able to sort them into alphabetical order.