SharePoint development, which has been in contact with designer, is designed to work with Visual Studio, the former design pages, the latter develop features, collaborate with each other, and complete SharePoint site development. Until SharePoint 2013 touches the site template, it is found that the site can also be developed directly through VS, creating master pages, pages, WebPart, lists, list items, site columns, and so on to complete a site development.
Perhaps I know too shallow, but in the browsing of many blogs, the temporary has not found a similar blog, so, write a blog to share with you. Also because it is a development example, so the function is relatively simple, I wrote a simple publishing site template, used to demo blog.
Have to say is that the theme of the template is environmental protection, when the increasingly severe haze weather, has seriously affected our lives and travel, I think, energy-saving environmental protection is everyone's obligations. Nonsense not to say much, into our subject.
First, describe what the demo Web site template includes:
1, a master page;
2, a website homepage;
3, two list: Picture news, text news;
4, 3 WebPart, including: Picture Carousel, Text News list display, text news level two page;
Secondly, introduce the specific structure of the site:
1. The master page publishes the page to the SharePoint site Master page library through module;
2, two WebPart is deployed through feature to the website;
3, the custom list is deployed to the website through the feature, and adds the column and the data in the list instance;
4, use the list template to define the list item Display page (dispform.aspx);
5, use WebPart definition list More page;
Visual Studio Solution structure diagram, as shown in the following illustration:
The role of each file is described in detail, as shown in the following illustration.
The structure of the site template, consisting primarily of three files, as shown in the Visual Studio chart above, we can see that these three files are:
1, Default.aspx-site template of the homepage;
2, ONET.xml--can say the site template structure of the XML description file;
3, Webtemp_publishsitetemplate.xml--site template of the XML description file.
First, master page development
To develop a site template, you first create a master page, which means that after you create a SharePoint empty solution, you add a new item as a module, as shown in the following figure: