Skip to main content

SharePoint 2010 and web templates

More information on sharepoint 2010 Web templates


To create the initial web template:

  • Users create a web template by saving a website "as template" in the user interface (UI). This is also the easiest way for you as a developer to begin. In the UI, create a website of a type that is most similar to the custom site type that you are creating.
  • Add or delete lists, Web Parts, and other Features as needed until the website matches your idea for a custom site type as closely as possible using only the Microsoft SharePoint Foundation UI and Microsoft SharePoint Designer.
  • When you have the prototype website as close as you can get it to your custom site type, save it as a template on the Site Settings page. The web template is saved to the site collection's Solution Gallery. Do not use spaces in the template name.
  • If you need additional customization that cannot be done in the UI, follow the steps in the procedure "To set up a Visual Studio project."
To set up a Visual Studio project:
  • Deactivate the solution in the Solution Gallery.
  • Download the solution (.wsp) file from the Solution Gallery.
  • Delete the solution from the Solution Gallery.
Note:
You can also write code to save a website as a template and download the solution package directly to the local file system, bypassing the Solution Gallery altogether. For an example, see the SPSolutionExporter.ExportWeb method.

  • In Microsoft Visual Studio, create an Import SharePoint Solution Package project. Specify that the project is a sandboxed solution, not a farm solution.
  • When you are prompted to specify the project source, specify the path to the solution that you downloaded.
  • When you are prompted to select the items to import, select all the items or just the items that are needed, and then click Finish.
  • When Visual Studio finishes creating the project, highlight the project name in Solution Explorer. In the Property window, set the Include Assembly in Package property to false.
  • Edit the extracted files as needed. In most cases, you have to change only the WebTemplate element or the Onet.xml file. For more information, see the following procedures
To edit the WebTemplate element:

  • In Solution Explorer, under the Web template node, there is a subfolder that contains an Elements.xml file. Open this file.
  • Edit the WebTemplate child element of the Elements tag as needed. For information about the meaning of the attributes of the WebTemplate element, see WebTemplate Element (Web template).

 To edit the Onet.xml file:
  1. The Onet.xml file for the web template is located either in the same subfolder as the Elements.xml file that contains the WebTemplate element, or in a subfolder in the Other Imported Files node in Solution Explorer. Open the Onet.xml file.
  2. Edit the Onet.xml file as needed. Editing this file is basically the same as editing an Onet.xml file that is part of a site definition. (For more information, see How to: Create a Custom Site Definition and Configuration.) But note these differences:
  • The Project element in a web template's Onet.xml file has only two child elements: the NavBars element and the Configurations element. The BaseTemplateID attribute and the BaseTemplateName attribute of the WebTemplate element identify the site definition from which the web template is ultimately derived. The Onet.xml file of the web template depends on the Onet.xml file of that source site definition for all other child elements of the Project element, including ListTemplates, DocumentTemplates, Modules, ServerEmailFooter, and Components.
  • The Configurations element has only one child Configuration element.
  • Some of the attributes of the WebTemplate element have the same name as attributes of the Project element. Use the attributes in the WebTemplate element.
For more information about this file, see Understanding Onet.xml Files.

To package, upload, and test the custom web template:

  • In Visual Studio, on the Build menu, select Deploy Solution. If your development farm is a single-server farm, this builds the solution, repackages it, uploads it to the site collection's sandboxed solutions gallery, and activates it. If your development farm is multi-server, you must perform the activation step in the UI.
  • Test the custom web template by creating a website from it.

Comments

  1. At this time it appears like Drupal is the best blogging platform
    available right now. (from what I've read) Is that what you are using on your blog?
    Stop by my site : Cute Blonde Gets Rammed By Stud

    ReplyDelete
  2. I have read so many content regarding the blogger lovers except this paragraph
    is actually a fastidious piece of writing, keep it up.
    Feel free to visit my web site ; Free porn videos and naked girls hardcore sex

    ReplyDelete
  3. What i don't realize is in reality how you are no longer actually much more smartly-appreciated than you may be now. You're so intelligent.
    You already know thus significantly relating to this topic, produced me individually imagine
    it from numerous varied angles. Its like men and
    women are not involved unless it's one thing to do with Woman gaga! Your own stuffs nice. Always handle it up!
    Here is my web page : click through the up coming web site

    ReplyDelete
  4. It's going to be ending of mine day, except before ending I am reading this wonderful paragraph to increase my experience.
    my web site: www.bhgalleries.com

    ReplyDelete
  5. Good way of describing, and pleasant article to take data about my presentation subject, which i
    am going to present in academy.
    Also visit my web blog Smoking Hot Brunette Gets Really Wet

    ReplyDelete
  6. Greetings! Very useful advice in this particular article!

    It's the little changes which will make the biggest changes. Many thanks for sharing!
    Review my page - hookah bars in Orlando

    ReplyDelete
  7. Hmm is anyone else having problems with the pictures on this blog loading?
    I'm trying to find out if its a problem on my end or if it's the blog.
    Any feed-back would be greatly appreciated.

    Also visit my web blog :: contemplatif

    ReplyDelete
  8. Good information. Lucky me I ran across your blog by chance (stumbleupon).
    I've saved as a favorite for later!

    Also visit my website adult webcam live chat

    ReplyDelete

Post a Comment

Popular posts from this blog

Tab Control in Asp.Net

Scenerio: I need your help in designing tab control in   asp.net .My requirement is I need a tab control in   asp.net (C#) like  for example goto my computer ,right click c drive and select properties.we get tabs like general,security etc....... like that i need to design one tab control(no need of any rightclick) in my web page and the database table columns should come as tabs and inseide the tab data of that particular column should come.   Example:Employee master tab1:Employee name.........his name in the tab tab2:Age.............his age tab3:Address........his address   Solution:   You can do this using a simple div <style type="text/css"> .tabs         {             position: relative;             height: 20px;             margin: 0;   ...

AI and Microsoft: Revolutionizing Efficiency in Nonprofit Organizations

  How AI and Microsoft Enhance Efficiency in Nonprofit Organizations In today’s fast-paced world, nonprofit organizations face unique challenges—limited resources, increasing demands, and the constant need to do more with less. But what if technology could be the game-changer they need? In my latest research paper,  "How AI and Microsoft Enhance Efficiency in Nonprofit Organizations" , I explore how cutting-edge technologies like Artificial Intelligence (AI) and Microsoft’s innovative tools are revolutionizing the way nonprofits operate. From streamlining administrative tasks to enhancing donor engagement and optimizing resource allocation, AI and Microsoft’s solutions are empowering nonprofits to focus on what truly matters—their mission. This paper dives deep into real-world examples, practical applications, and the transformative potential of these technologies. Whether you’re a nonprofit professional, a tech enthusiast, or simply curious about the intersection of technolo...

Social tagging overview in Sharepoint 2010

A tag is a word or phrase that identifies an individual piece of information according to a set of attributes or criteria. Tags make it easy to find and share information about a specific subject or task. Social tagging helps users categorize information in ways that are meaningful to them. Social tagging can improve the quality of search results by filtering against specific tags, and it can also connect individuals who want to share information with other users who have like interests. This article describes the social tagging features in Microsoft SharePoint Server 2010. This article does not describe how to configure social tagging features. It also does not discuss how to implement social tagging features as part of an overall social media strategy for an enterprise. About using social tagging features Social tagging features help users to share information and to retrieve relevant, high-quality content more efficiently. Such sharing encourages collaboration and b...