All About SharePoint

Liedong(Ken) Zheng,SharePoint Leader at SIMPLOT

Posts Tagged ‘Site Definition’

Create a Basic Site Definition Project in SharePoint 2010

Posted by ken zheng on September 14, 2010

To create a Site Definition in visual studio 2010 is much easier. Just create a project using site definition template.

You can follow this Walkthrough: Create a Basic Site Definition Project also this blog.

Here is the Walkthrough: Creating a Site Definition with Additional Content

But here is gotcha, once you press F5, you may not see the template in the SharePoint Customizations tab. You will need to do IISRESET.

Posted in Sharepoint | Tagged: | Leave a Comment »

Create a Site Definition In VS 2008

Posted by ken zheng on October 5, 2008

To create a SharePoint Team Site Definition project

1.

Start Visual Studio.
2.

On the File menu, click New, and then click Project. The New Project dialog box appears.
3.

In the Project types pane, click Visual C#, and then select the SharePoint category.
4.

In the Templates pane, select Team Site Definition. Specify a Name and Location for the project, and click OK. Visual Studio creates the project and opens the generated onet.xml file.

Add a Custom Master Page to the Site Definition

If the default.master page already meets most needs and only a few changes are required, a good option for creating a new master page is to copy default.master and then modify the copy. This is the approach illustrated by this Visual How To.

By default, the default.master page is located in the following folder on the drive to which Windows SharePoint Services 3.0 was installed:

drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\GLOBAL
To add a copy of the default.master file to the project

1.

Copy the default.master file into the Site Definition folder under the site definition project folder that was created by Visual Studio. (The Site Definition folder contains the default.aspx and onet.xml files generated by Visual Studio.)
2.

Rename the copy of the master page to mydefault.master.
3.

In Visual Studio, click the Project menu, and then click Add Existing Item. Visual Studio displays the Add Existing Item dialog box.
4.

Navigate to the Site Definition folder that contains the mydefault.master file. In the Files of type list, select All Files (*.*). Select the mydefault.master file, and then click Add.

or you can download free MASTER PAGEs from http://www.microsoft.com/downloads/details.aspx?FamilyID=7c05ca44-869a-463b-84d7-57b053711a96&DisplayLang=en

Then you need to edit ONE.XML file, follow this tutorial

Change the link to:

So you just need to copy images and styles folders in your root site. And after you deploy the solution , you can create a site based on your new site template and new sub site can use the css and images

Posted in Sharepoint, VS2008 | Tagged: | 3 Comments »

 
Follow

Get every new post delivered to your Inbox.

Join 28 other followers