Intranet Journal   Earthweb  
Events Jobs Premium Services Media Kit Network Map E-mail Offers Vendor Solutions Webcasts

   Intranet Journal Subjects
Search Earthweb

Privacy Policy



internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

internet commerce
Be a Commerce Partner
















 

[ Home | Discussion Forum | How Do I... | Lotus Notes Intranets | Microsoft SharePoint | Products | Shopping  ]

free news!


How To Use Site Definitions in SharePoint


By Robert Bogue
8/4/2008

Go to page: 1 2  

Printer Friendly Version

By creating your own site definition you have less chances for issues related to user deactivating features that they shouldn't.

Differentiation

One of the challenges with working with large numbers of sites in SharePoint is just determining what the site is supposed to be from code. Sure the user can quickly tell the difference between a Six Sigma site and a budgeting site, but how do you determine which type of site it is from code?

If you're using site definitions for the major categories of sites in your organization you can easily determine what kind of a site an instance is by just reviewing the SPWeb.WebTemplate or SPWeb.WebTemplateId properties. These fields allow you to see which site definition a site was created from.

There is no other named property that allows you to differentiate the type of site. These properties can be used to clearly identify which sites are your special sites -- ones with special code or special rules -- and which ones are out of the box collaboration sites.

It should be noted that it's possible, without implementing a site definition, to differentiate sites from one another. Each site has a property bag associated with it. It is possible to insert an entry into this property bag about what the site is supposed to be. In fact, I've used this strategy in certain circumstances, however, if you're using properties a lot you'll find that it's inconvenient to have such an important system property stored along with user supplied information.

Implementing Site Definitions

In an organization it makes sense to develop a minimal site definition that contains all of the basic elements that are required and make copies of this base site definition for every type of site that you wish to differentiate. This minimizes the work that must be done for each site definition while simultaneously supporting a clean solution.

Creating your own site definition isn't that difficult. You can start with the Minimal Publishing Site which is available from the Features project on Codeplex or download the code from Andrew Connell's book Professional SharePoint 2007 Web Content Management Development: Building Publishing Sites with Office SharePoint Server 2007. (The Download is at http://www.wrox.com/WileyCDA/WroxTitle/productCd-0470224754,descCd-DOWNLOAD.html)

It's true that both of these examples are publishing examples, but those are the most technically challenging to create and thus are the ones that samples are most needed for.

Making Sense of it All

If you take a step back and look at the problem you'll find that you'll likely start with using features to make your modifications. You'll deploy your branding through master pages, web part pages, and page layouts. When you need to differentiate between different kinds of sites. What this means for a governance plan is that you'll likely want to offer an instance of a standard site definition -- one that has the branding and core features baked in -- to key projects in the organization so it's easy and consistent to identify which sites belong to each project.

Go to page: 1 2  

Printer Friendly Version


Other Resources
from Intranet Journal
Intranet Journal Discussion Forum

Intranet Journal Announces 2008 Product of the Year Winners

10 Open Source Apps for Enterprise Users

Why Ubuntu Linux Tops Debian

IDM Dreamweaver Tutorial

Creating a PHP-Based Content Management System

email this page

Tutorials
and more at:
Intranet Journal's Tutorials
Intranet Journal Favorites

Creating a PHP-Based Content Management System

The Spyware Guide

Introduction to Microsoft SharePoint Portal

Intranet Journal
Part of the EarthWeb Network

Managing Editor
Intranet Journal

Tom Dunlap

EarthWeb Home Page
Jupitermedia Home Page

Media Kit




The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers