SPSF Core Recipes for SharePoint SoftwareFactory

Documentation




Version: 2.4.3
Authors: Torsten Mandelkow, Matthias Einig





 

1. Overview

Welcome to SPSF Core Recipes for SharePoint SoftwareFactory


The SPSF Core Recipes for SharePoint SoftwareFactory is provided by the team of SharePoint Consultants of Steria Mummert Consulting AG in Germany.

Our intention is to provide our tools and concepts to the SharePoint community to make it easier to develop custom applications in SharePoint.

SPSF is based on open technology by Microsoft

SPSF Core Recipes for SharePoint SoftwareFactory is based on the free Microsoft Guidance Automation Toolkit (GAX). This toolkit is used to create software factories and several software factories are already provided by Microsoft, e.g. SFSF Smart Client Software Factory, WSSF Web Service Software Factory etc.

SPSF is NOT "yet another SharePoint framework"

We want to make sure that SPSF is not a SharePoint framework which needs to be installed in SharePoint or has dependencies to custom assemblies for SharePoint applications.
  • SPSF helps to generate SharePoint code like a experienced developer would write. The generated code is based on our projects or taken from MSDN.
  • There is no dependency to SPSF. Projects created with SPSF can be opended and compiled on any other plain computer with Visual Studio 2008.


SPSF is part of SPALM SharePoint Application Lifecycle Management

SPSF Core Recipes for SharePoint SoftwareFactory is part of our solution "SPALM - SharePoint Application Lifecycle Management". SPALM provides strategies, methods and tools to provide real Application Lifecycle Management for SharePoint development processes, which include
  • SharePoint Requirements Management
  • SharePoint Application Architecture
  • SharePoint Code Generation (SPSF SharePoint Software Factory)
  • SharePoint Code Analysis (SPCop)
  • SharePoint Deployment
  • SharePoint Testing

How to use the SharePoint recipes

Most SharePoint recipes like "Create new Content Type" are displayed in context menus dependend on the current selection. For instance the recipe "Create new Content Type" is only displayed on projects which will create a .wsp solution.



Alternatively you can use the "New Item" dialog to run the SharePoint recipes.



More help

SPSF SharePoint SoftwareFactory provides an extensive help which is also integrated into the Visual Studio help.
More information can also be found here: www.spalmblogger.de

Further information

For more information on guidance automation, please see the following resources:

1.1. About

The Core Recipes are part of the SPALM (SharePoint Application Lifecycle Management) solution. SPALM was created by the SharePoint Consultants of Steria Mummert Consulting AG to support the implementation of SharePoint Applications with TFS.
To use the core recipes the SharePoint Software Factory (SPSF) Framework has to be installed on the development machine.
The software factory is an "extension" for Visual Studio 2005, 2008 and 2010 (not entirly tested yet) to allow easier development of SharePoint applications. It is based on the Microsoft Guidance Automation Toolkit.

This project is intended to show the capabilities of a SharePoint software factory with some examples.
Everybody is invited:

Target plattforms are
We (as Steria Mummert Consulting AG) will further support SPALM with new recipes and templates over time. You can find slides about the software factory at our project blog at http://www.spalmblogger.de.
 

1.2. System Requirements

The SPSF Software Factory requires the following components:
 

1.3. SPSF Editions

Available SPSF Editions

We provide the SharePoint Software Factory mainly to our customers. But to allow others to use the software factory for free we provide 2 editions. The only limitation is that the full version supports develoment in teams e.g. with Team Foundation Server.

Differences between SPSF Editions

Functionality Express Edition Team Edition
Usage of recipes Unlimited Unlimited
Usage of project templates Unlimited Unlimited
Source code available Yes Yes
Source Control supported No Yes
Team Build No Yes
 

1.4. Contact

SPSF is provided by SharePoint Consultants of Steria Mummert Consulting AG in Germany.

You can reach the authors of SPSF here:
 

2. Recipes

2.1. Features

2.1.1. Empty Feature

Description

This recipe creates an empty farm, web application, site or web feature.

Recipe Description

The recipe creates a new empty feature. It should be used as a start for every custom feature.
It can be specified if the feature should be deployed in a farm, web application, site, or web scope.
Most of sharepoint custom components like content types, event handler etc. require a feature.
One feature can be used to deploy multiple of these components but it is also possible to make feature activation dependent of other features.

Arguments

Name Description
Name Required Text. Internal name of the Feature. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title (friendly name) of the Feature. Limited to 255 characters.
Description Required Text. Longer description of the Features purpose.
Scope Required Choice. Scope in which the Feature can be activated and contains one of the following values: Farm (farm), WebApplication (Web application), Site (site collection), Web (Web site).
Hidden Optional Boolean. Specifies if the feature should be hidden on the Feature activation webpages. This attribute equals FALSE by default.
Create Feature Receiver Optional Boolean. When activated, a feature receiver class file will be created and linked to the Feature. This attribute equals FALSE by default.
Create default elements.xml Optional Boolean. When activated the recipe creates a default elements.xml file. This attribute equals TRUE by default.
Feature ID Required GUID. The GUID will be autogenerated by the recipe, but can be customized if neccesary.
Feature Version Optional Text. Specifies a System.Version-compliant representation of the version of a Feature. This can be up to four numbers delimited by decimals that represent a version.
Creator Optional Text. Name of the creator of the Feature stored in the feature.xml.
Activation Dependencies Optional GUID. One or multiple Features of which the activation of this Feature should depend on. The dependencies can be either out of the box SharePoint Features or custom Features of this project.
Activate On Default Optional Boolean. TRUE if the Feature is activated by default during installation or when a Web application is created; FALSE if the Feature is not activated. This attribute equals TRUE by default. The ActivateOnDefault attribute does not apply to site collection (Site) or Web site (Web) scoped Features. In general, Farm-scoped Features become activated during installation, and when a new Web application is created, all installed Web application-scoped Features in it become activated.
Always Force Install Optional Boolean. TRUE if the Feature is installed by force during installation even if the Feature is already installed. For example, if set to TRUE, Feature installation callouts will always fire anytime a user tries to install the Feature (even if it is already installed) by using either the scanforFeatures or installfeature command-line operation. This attribute equals FALSE by default. The AlwaysForceInstall attribute affects Features of all scopes.
Auto Activate In Central Admin Optional Boolean. TRUE if the Feature is activated by default in the Administrative Web site, site collection, or Web application. This attribute equals FALSE by default. The AutoActivateInCentralAdmin attribute does not apply to Farm-scoped Features.
Require Resources Optional Boolean. TRUE to specify that Windows SharePoint Services check whether resources exist for the Feature by verifying that the standard "sentinel" resource for the Feature is present for a particular culture. The RequireResources attribute allows you to constrict the visibility of certain Features depending on whether resources exist in a particular language for the Feature.

References

Authors

Version history

 

2.2. List and DocLib

2.2.1. Content Type

Description

Adds a content type to the current selected feature

Arguments

Name Description
Parent Content Type Required. New content type will be derived from the selected parent content type.
Name Required Text. Specifies the content type name.
Description Optional Text. Provides a description for the content type, to display in the Windows SharePoint Services user interface.
Group Optional Text. Specifies the content type group to which the content type is assigned. Content type groups are user-defined groups that help you organize your columns into logical categories.
Fields Optional. Specifies a column to reference in this content type.
Remove Fields Optional. Specifies a column reference, included in the parent content type, to be removed from this content type.
Document Template Optional Text. Document template which is used for creation of new items based on this content type.
Place template in _layouts folder for easier upgrade Optional Boolean. If checked, the selected document template will be placed inside the /_layouts/ in SharePoint and can be updated easier in the future. Otherwise the document template will be stored in the database.
Item Adding Optional Boolean. If checked an event handler for ItemAdding event is added to the content type.
Item Added Optional Boolean. If checked an event handler for ItemAdded event is added to the content type.
Item Updating Optional Boolean. If checked an event handler for ItemUpdating event is added to the content type.
Item Updated Optional Boolean. If checked an event handler for ItemUpdated event is added to the content type.
Item Deleting Optional Boolean. If checked an event handler for ItemDeleting event is added to the content type.
Item Deleted Optional Boolean. If checked an event handler for ItemDeleted event is added to the content type.
Custom Display Form Optional Boolean. If checked a custom form for the display mode of the content type is added.
Custom Edit Form Optional Boolean. If checked a custom form for the edit mode of the content type is added.
Custom New Form Optional Boolean. If checked a custom form for the creation of the content type is added.
Content Type ID Required Text. Specifies the content type ID of the content type.
Content Type Version Reserved for future use.
Hidden Optional Boolean. TRUE to define the content type as hidden. If you define a content type as hidden, Windows SharePoint Services does not display that content type on the New button in list views. If you do not include this attribute, Windows SharePoint Services treats the content type as if this attributes was set to FALSE.
Read Only Optional Boolean. TRUE to define the content type as read-only. If you do not include this attribute, Windows SharePoint Services treats the content type as if this attributes was set to FALSE.
Sealed Optional Boolean. TRUE to define the content type as sealed. You must have site collection administrator rights to unseal and edit a content type defined as sealed. If you do not include this attribute, Windows SharePoint Services treats the content type as if this attributes was set to FALSE.

References

Authors

Version history

2.2.2. Content Type Binding

Description

Adds a binding between a content type and a list

Arguments

Name Description
Content Type A string that represents the content type ID of the site content type to bind to the specified list.
List Url A string that represents the server-relative path to the list to which to bind the content type (e.g. "Pages", "Lists/Contacts").

References

Authors

Version history

2.2.3. List Definition

Description

Adds a list definition based on a local installed list definition

Arguments

Name Description
Base Template Required Integer. Specifies the base type, or default schema, for lists created from the definition.
Name Required Text. Specifies the internal name of the list definition. No spaces or special characters can be used. This name is also used to find the folder that contains the Schema.xml file that defines the schema in use.
DisplayName Required Text. Specifies the display name of the list definition.
Description Optional Text. Provides a description of the list definition.
Category Optional Text. Specifies the category with which to associate lists created through the list definition.
Sequence Optional Integer. Specifies the ordering priority to use for the list template on the Create page. If Sequence is not set, the template appears last in arbitrary order with any other templates that also lack a Sequence value. Two templates that specify the same sequence are sorted together in an arbitrary order.
Type Optional Integer. Provides a unique identifier for the template. This identifier must be unique within the feature, but need not be unique across all feature definitions or site definitions.
Base Type Required Integer. Specifies the base type, or default schema, for lists created from the definition.
Additional Content Types Optional Content Types.
Default in new sites Optional Boolean. TRUE to specify that new SharePoint sites will include this list.
OnQuickLaunch Optional Boolean. TRUE to display lists created from the list definition on the QuickLaunch bar.
DisableAttachments Optional Boolean. TRUE to specify that users can attach files to items in lists created through the template; otherwise, FALSE.
DisallowContentTypes Optional Boolean. TRUE to specify that content types can be managed on lists created through the template; otherwise, FALSE.
VersioningEnabled Optional Boolean. TRUE to specify that versioning is enabled by default in lists created through the template; otherwise, FALSE.
FolderCreation Optional Boolean. TRUE to enable folder creation within the list and to specify that the New Folder command appears on the New menu in list views; otherwise, FALSE.
EnableModeration Optional Boolean. TRUE to specify that content approval is enabled by default in lists created through the template; otherwise, FALSE.
Hidden Optional Boolean. TRUE to specify that the list definition is not available on the Create page for creating lists.
HiddenList Optional Boolean. TRUE to specify that a list created from the list definition is hidden.
Security Read Optional Text. Defines the item-level permissions in the list for users with sufficient permission to read or edit list items. The SecurityBits attribute contains a 2-digit string. The first digit in the string controls the read access; the second digit in the string controls the edit access.
Security Edit Optional Text. Defines the item-level permissions in the list for users with sufficient permission to read or edit list items. The SecurityBits attribute contains a 2-digit string. The first digit in the string controls the read access; the second digit in the string controls the edit access.

Authors

Version history

2.2.4. List Instance

Description

Adds a list instance definition to a feature.

Arguments

Name Description
Title Required Text. Title of the list in the schema.
Description Optional Text. Contains a description of the list.
Template Type
Url Required Text. Returns the site-relative URL at which to place the list.
RootWebOnly Optional Boolean. TRUE to specify that the list created from the definition exists only in the root Web site of a site collection.
OnQuickLaunch Optional Boolean. TRUE to display lists created from the list definition on the Quick Launch bar.
QuickLaunchUrl Optional Text. Specifies the URL of the view page to open for the list through Quick Launch navigation.
Id Required Text. Specifies a unique identifier for the list instance. The integer must be unique across the Feature definition.

Authors

Version history

2.2.5. Module

Description

Adds a module to the current selected feature to provision files

Arguments

Name Description
Name Required Text. Contains the name of the file set.
Target Url Optional Text. Specifies the virtual path of the folder in which to place the files when a site is instantiated. If Path is not specified, the value of Url is used for the physical path. Use the Url attribute to provision a folder through the Feature.
Files Select the files which should be added to the module. The selected files will be copied into the project.
RootWebOnly Optional Boolean. TRUE if the files specified in the module are installed only in the top-level Web site of the site collection.

Authors

Version history

2.2.6. Site Column

Description

Adds a site column to the current selected feature

Arguments

Name Description
ID Required Text. Specifies the GUID of the field.
Name Required Text. The name of a field. This is the internal name of a field and is guaranteed never to change for the lifetime of the field definition. It must be unique with respect to the set of fields in a list. The name is autogenerated based on the user-defined name for a field.
Display Name Optional Text. The displayed name for a field. There is no restriction on text size or use of spaces. The display name can be edited by the user and can change after initial field creation. This name is used as a column heading when the field is displayed in a table view and as a form label when the field is displayed in a form. The FieldName tag returns the display name if given; otherwise, it defaults to the Name attribute.
Description Optional Text. Provides the description that is shown in the edit form for a list if a field description is specified. By default, fields in Microsoft Windows SharePoint Services do not have descriptions.
Group Optional Text. Specifies the column group to which the field belongs.

References

Authors

Version history

 

2.3. Field Types

2.3.1. Simple Field Type

Description

Adds a field type to the project

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types.
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a simple Field Type to your project.

Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Parent Type Required Type. The parent field type from which this type will inherit.
Display Name Required Text. The display name for this field type.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).

References

Authors

Version history

2.3.2. Field Type with a complex value

Description

Adds a custom field type to store complex objects

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types.
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a MultiColumn Field Type to your project.

Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).
Display Name in column 'Type' Required Text. The display name for this field type.

References

Authors

Version history

2.3.3. Field Type with multiple columns

Description

Sample to store a address with multiple columns.

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types.
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a simple Field Type to your project.

Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).
Display Name in column 'Type' Required Text. The display name for this field type.

References

Authors

Version history

2.3.4. Field Type Choice

Description

Sample to store an employee status

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types.
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a simple Field Type to your project.

Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).
Display Name in column 'Type' Required Text. The display name for this field type.

References

Authors

Version history

2.3.5. Field Type Sample ISBN10 (Sample)

Description

Sample from MSDN for a custom field type to store a ISBN10 number including validation rule

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types.
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a simple Field Type to your project.

Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).
Display Name in column 'Type' Required Text. The display name for this field type.

References

Authors

Version history

2.3.6. Field Type Social Security Number (Sample)

Description

Sample from Ted Pattison for a custom field type to store social security number

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types.
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a simple Field Type to your project.

Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).
Display Name in column 'Type' Required Text. The display name for this field type.

References

Authors

Version history

2.3.7. Field Type for Flash Movie (Sample)

Description

Sample for a custom field type to render a flash movie

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types.
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a simple Field Type to your project.

Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).
Display Name in column 'Type' Required Text. The display name for this field type.

References

Authors

Version history

2.3.8. Field Type for Ratings (Sample)

Description

Sample for a custom field type to show a rating with graphics

Recipe Description

As you store your business information in Windows SharePoint Services 3.0, you may encounter instances where your important business data does not conform to the field types included in Windows SharePoint Services, or situations where you want to further customize those general field types.
Windows SharePoint Services enables you to create custom field types.
These custom fields can include custom data validation and custom field rendering.
You can also customize the way that variable properties of your custom field types are processed and rendered when users set property variables and create new columns that are based on your custom field type.

This recipe adds a simple Field Type to your project.

Screens



Arguments

Name Description
Field Type Name Required Text. Name of the Field Type. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Description Required Text. Longer description about the purpose of the field type (will be displayed in "Create Column" next to the field selector).
Display Name in column 'Type' Required Text. The display name for this field type.

References

Authors

Version history

 

2.4. Custom Actions

2.4.1. Custom Action for Content Type

Description

Adds a custom action to content type menu (ECB)

Screens


Arguments

Name Description
Content Type Select the content type to which the custom action should be added.
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Custom Action ID Optional Text. Specifies a unique identifier for the custom action. The ID may be a GUID, or it may be a unique term, for example, "HtmlViewer".
Show In Lists
Show In ReadyOnly ContentTypes Optional Boolean. TRUE if the custom action is only displayed for read-only content types on the page for managing content types. The default value is FALSE.
Show In Sealed ContentTypes Optional Boolean. TRUE if the custom action is only displayed for sealed content types on the page for managing content types. The default value is FALSE.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Type of action Required. Select the type of action that should be performed after click.
Url Page Optional Text. Select a page where the custom action should link to. Only required if field 'Type of action' is 'UrlAction'.
Use URL Prefix Optional Text. Select the prefix which should be placed at the beginning of the url action.

Authors

Version history

2.4.2. Custom Action for File Extension

Description

Adds a custom action for a specific extension (e.g. .docx)

Arguments

Name Description
Extension Enter the file extension.
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Custom Action ID Optional Text. Specifies a unique identifier for the custom action. The ID may be a GUID, or it may be a unique term, for example, "HtmlViewer".
Show In Lists
Show In ReadyOnly ContentTypes Optional Boolean. TRUE if the custom action is only displayed for read-only content types on the page for managing content types. The default value is FALSE.
Show In Sealed ContentTypes Optional Boolean. TRUE if the custom action is only displayed for sealed content types on the page for managing content types. The default value is FALSE.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Type of action Required. Select the type of action that should be performed after click.
Url Page Optional Text. Select a page where the custom action should link to. Only required if field 'Type of action' is 'UrlAction'.
Use URL Prefix Optional Text. Select the prefix which should be placed at the beginning of the url action.

Authors

Version history

2.4.3. Custom Action for ProgID (Document Type)

Description

Adds a custom action to a document type e.g. "InfoPath.Document"

Arguments

Name Description
Content Type Select the document type to which the custom action should be added.
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Custom Action ID Optional Text. Specifies a unique identifier for the custom action. The ID may be a GUID, or it may be a unique term, for example, "HtmlViewer".
Show In Lists
Show In ReadyOnly ContentTypes Optional Boolean. TRUE if the custom action is only displayed for read-only content types on the page for managing content types. The default value is FALSE.
Show In Sealed ContentTypes Optional Boolean. TRUE if the custom action is only displayed for sealed content types on the page for managing content types. The default value is FALSE.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Type of action Required. Select the type of action that should be performed after click.
Url Page Optional Text. Select a page where the custom action should link to. Only required if field 'Type of action' is 'UrlAction'.
Use URL Prefix Optional Text. Select the prefix which should be placed at the beginning of the url action.

Authors

Version history

2.4.4. Custom Action for List

Description

Adds a custom action to existing menus in a list view (Settings, Actions etc.)

Screens



Arguments

Name Description
List Type Select the list type where the action should be added.
Toolbar Select the location where the action should be added.
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Custom Action ID Optional Text. Specifies a unique identifier for the custom action. The ID may be a GUID, or it may be a unique term, for example, "HtmlViewer".
Show In Lists
Show In ReadyOnly ContentTypes Optional Boolean. TRUE if the custom action is only displayed for read-only content types on the page for managing content types. The default value is FALSE.
Show In Sealed ContentTypes Optional Boolean. TRUE if the custom action is only displayed for sealed content types on the page for managing content types. The default value is FALSE.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Type of action Required. Select the type of action that should be performed after click.
Url Page Optional Text. Select a page where the custom action should link to. Only required if field 'Type of action' is 'UrlAction'.
Use URL Prefix Optional Text. Select the prefix which should be placed at the beginning of the url action.

Authors

Version history

2.4.5. Custom Action for List Toolbar

Description

Adds a custom action to a toolbar in a list (View, Edit, Display etc.)

Screens


Arguments

Name Description
List Type Select the list type where the action should be added.
Toolbar Select the toolbar where the action should be added.
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Custom Action ID Optional Text. Specifies a unique identifier for the custom action. The ID may be a GUID, or it may be a unique term, for example, "HtmlViewer".
Show In Lists
Show In ReadyOnly ContentTypes Optional Boolean. TRUE if the custom action is only displayed for read-only content types on the page for managing content types. The default value is FALSE.
Show In Sealed ContentTypes Optional Boolean. TRUE if the custom action is only displayed for sealed content types on the page for managing content types. The default value is FALSE.
Require Site Administrator Optional Boolean. TRUE to specify that the item be displayed only if the user is a site administrator; otherwise, FALSE. Using the RequireSiteAdministrator attribute for the drop-down menu of Windows SharePoint Services commands associated with list items is not supported.
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Type of action Required. Select the type of action that should be performed after click.
Url Page Optional Text. Select a page where the custom action should link to. Only required if field 'Type of action' is 'UrlAction'.
Use URL Prefix Optional Text. Select the prefix which should be placed at the beginning of the url action.

Authors

Version history

2.4.6. Custom Action for Site

Description

Adds a custom action to a site

Screens


Arguments

Name Description
Menu Location
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Custom Action ID Optional Text. Specifies a unique identifier for the custom action. The ID may be a GUID, or it may be a unique term, for example, "HtmlViewer".
Type of action Required. Select the type of action that should be performed after click.
Url Page Optional Text. Select a page where the custom action should link to. Only required if field 'Type of action' is 'UrlAction'.
Use URL Prefix Optional Text. Select the prefix which should be placed at the beginning of the url action.

Authors

Version history

2.4.7. Custom Action for SiteActions menu

Description

Adds a custom action to the SiteActions menu

Screens



Arguments

Name Description
Rights Optional Text. Specifies a set of rights that the user must have in order for the link to be visible. If not specified, then the action always appears in the list of actions. The set of rights are grouped logically according to AND logic.
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Custom Action ID Optional Text. Specifies a unique identifier for the custom action. The ID may be a GUID, or it may be a unique term, for example, "HtmlViewer".
Type of action Required. Select the type of action that should be performed after click.
Url Page Optional Text. Select a page where the custom action should link to. Only required if field 'Type of action' is 'UrlAction'.
Use URL Prefix Optional Text. Select the prefix which should be placed at the beginning of the url action.

Authors

Version history

2.4.8. Custom Action Group

Description

Adds a custom action to a site

Screens


Arguments

Name Description
Title Required Text. Specifies the end user description for this action.
Description Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.
Sequence Optional Integer. Specifies the ordering priority for actions.
Hide Location Select the location where the action group should be added.

References

Authors

Version history

2.4.9. Hide Custom Action

Description

Hides an action of an item

Arguments

Name Description
Location Element Select the action which should be hidden.

Authors

Version history

 

2.5. Event Receivers

2.5.1. Item Event Handler

Description

Adds a event handler to react of event like ItemAdded, ItemUpdating etc.

Recipe Description

Creates a ItemEventHandler. There are always two types of events attached for every event.

Arguments

Name Description
Name Required Text. Used as the class name of the event handler.
List Template Optional Text. Specifies the index of the list template to which the event receiver applies. The following values are the default list template types.
List Template Owner Optional GUID. Specifies the GUID of the list template owner if the list template is registered via Features, or the name of the site definition if the list template is registered by a site definition.
Sequence Required Number. Specifies the order to use for the event registration when more than one handler is associated with the feature.
Registration with feature receiver Optional Boolean. If checked the registration is done with code in a feature receiver. If not it is done via xml.
Event Types Select the event elements.

References

Authors

Version history

2.5.2. List Event Handler

Description

Adds a event handler to handle events like FieldAdded, FieldUpdating etc.

Recipe Description

Creates a ListEventHandler. There are always two types of events attached for every event.

Arguments

Name Description
Name Required Text. Used as the class name of the event handler.
List Template Optional Text. Specifies the index of the list template to which the event receiver applies. The following values are the default list template types.
List Template Owner Optional GUID. Specifies the GUID of the list template owner if the list template is registered via Features, or the name of the site definition if the list template is registered by a site definition.
Sequence Required Number. Specifies the order to use for the event registration when more than one handler is associated with the feature.
Registration with feature receiver Optional Boolean. If checked the registration is done with code in a feature receiver. If not it is done via xml.
Event Types Select the event elements.

References

Authors

Version history

2.5.3. Web Event Handler

Description

Adds a event handler to webs

Recipe Description

Event handlers for sites and webs must be registered with a feature receiver

Arguments

Name Description
Name Required Text. Used as the class name of the event handler.
Sequence Required Number. Specifies the order to use for the event registration when more than one handler is associated with the feature.
Event Types Select the event elements.

References

Authors

Version history

2.5.4. Email Event Handler

Description

Adds a event handler to handle events like EmailReceived

Recipe Description

Debugging of email events requires attaching to ows timer service.
After changing code the ows timer needs to be restarted. IISReset will not load new assembly to ows timer.

Arguments

Name Description
Name Required Text. Used as the class name of the event handler.
List Template Optional Text. Specifies the index of the list template to which the event receiver applies. The following values are the default list template types.
Sequence Required Number. Specifies the order to use for the event registration when more than one handler is associated with the feature.
Event Types Select the event elements.

References

Authors

Version history

 

2.6. Webs and Sites

2.6.1. Blank Site Definition

Description

Adds a custom blank site definition

Recipe Description

The BalnkSite Definition is a standard site definition which does not contain any lists or libraries.
This site definition can be used as a starting point to create a custom site definition
based on the default out of the box configuration which comes with WSS.

Arguments

Name Description
Name Required Text. Specify the name of the folder which will be created in folder SiteTemplates. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title of the site template as it appears in the selection of Create Site dialog. Limited to 255 characters.
ID Required Number. Id of the site template. Should be unique on the farm and greater than 10000.
Description Required Text. Longer description of the purpose of this site definition.
Category Required Text. Title of the cateogry in which the site definition should appear in the Create Site dialog. Limited to 255 characters.
Hidden Optional Boolean. If TRUE hides the site definition from the Create Site dialog. Creation of sites with this definition through code will be still possible.
RootWebOnly Optional Boolean. If TRUE the site created from the configuration can only exist as the root Web site in a site collection. This attribute is not enforced in site templates (.stp files).
Visibility Feature Dependency Optional Text. Optional Text. Used in a WebTemp*.xml file to hide the site definition configuration based on the activation state of the specified Feature. This attribute is not supported for Features with Web application scope.

References

Authors

Version history

2.6.2. Team Site Definition

Description

Adds a custom team site definition

Recipe Description

The Team Site Definition is a standard preconfigured site definition which already contains a documents library,
an announcements list, discussion list etc. This site definition can be used as a starting point to create a custom team site definition
based on the default out of the box configuration which comes with WSS.

Arguments

Name Description
Name Required Text. Specify the name of the folder which will be created in folder SiteTemplates. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title of the site template as it appears in the selection of Create Site dialog. Limited to 255 characters.
ID Required Number. Id of the site template. Should be unique on the farm and greater than 10000.
Description Required Text. Longer description of the purpose of this site definition.
Category Required Text. Title of the cateogry in which the site definition should appear in the Create Site dialog. Limited to 255 characters.
Hidden Optional Boolean. If TRUE hides the site definition from the Create Site dialog. Creation of sites with this definition through code will be still possible.
RootWebOnly Optional Boolean. If TRUE the site created from the configuration can only exist as the root Web site in a site collection. This attribute is not enforced in site templates (.stp files).
Visibility Feature Dependency Optional Text. Optional Text. Used in a WebTemp*.xml file to hide the site definition configuration based on the activation state of the specified Feature. This attribute is not supported for Features with Web application scope.

References

Authors

Version history

2.6.3. Feature Stapling

Description

Adds a FeatureSitetemplateAssocation to the selected feature

Recipe Description

Stapling SharePoint features with site definitions, which relies on the FeatureSiteTemplateAssociation element, allows developers to attach features to both standard and custom site definitions without directly modifying them.
Every new site that is based on a site definition with a stapled feature is created with that feature activated.
Feature stapling is particularly useful when you want to add functionality to standard site definitions because editing standard site definition files is not a recommended practice. (Source: MSDN

Arguments

Name Description
Feature Required Feature. Feature to which the previously selected feature should be stapled to.
Site Template Optional Site Definition. Site Definition to which the previously selected feature should be stapled to.

References

Authors

Version history

2.6.4. Theme

Description

Adds a theme to the project

Recipe Description

With a theme SharePoint Look & Feel can be altered only by modifying cascading stylesheets (CSS) and images.
Opposing to master pages, also affect the MOSS backend without the need to modify application.master (which is not recommended anyway).
This recipe creates a new basic theme which can be deployed to a farm with a feature.

Arguments

Name Description
Name Required Text. Internal name of the Feature. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Display Name Required Text. Display name of the Theme. Limited to 255 characters.
Description Optional String. Longer description ofthe theme.

References

Authors

Version history

2.6.5. Theme Activation

Description

Adds code to activate a theme with a web feature

Recipe Description

Use this recipe if a custom theme should be activated on a site, together with the activation of a feature.
It is also possible to specificy which theme default theme should be used, when the feature is deactivated again.

Arguments

Name Description
Theme to activate Required Theme. The name of the theme which should be activated
Default theme for deactivation of the feature Required Theme. The name of the default theme which is activated if the feature is deactivated.

References

Authors

Version history

 

2.7. Publishing

2.7.1. Publishing Site Definition

Description

Adds a standard publishing site definition along with the required features.

Recipe Description

The publishing site definition creates a site with the publishing infrastructure and publishing site feature enabled and provides functionalities for web content management.
It creates three features which are required to activate the several components of the publishing site.

Arguments

Name Description
Name Required Text. Specify the name of the folder which will be created in folder SiteTemplates. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title of the site template as it appears in the selection of Create Site dialog. Limited to 255 characters.
ID Required Number. Id of the site template. Should be unique on the farm and greater than 10000.
Description Required Text. Longer description of the purpose of this site definition.
Display Category Required Text. Title of the cateogry in which the site definition should appear in the Create Site dialog. Limited to 255 characters.
Name Required Text. Name of the Master Page. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title (friendly name) of the Page Layout. Limited to 255 characters.
Description Optional Text. Description of the Master Page.
Page Layout Content Type Required Content Type. Content Type of this Page Layout.
Name Required Text. Name of the Page Layout class file. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title (friendly name) of the Page Layout. Limited to 255 characters.
Description Optional Text. Description of the Page Layout.
Create Provisioning XML Optional Boolean. If TRUE creates a file named Portal.XML with XML data for the creation of subsites after provisioning this site template.
Create Provisioning Handler (.cs) Optional Boolean. If TRUE creates a cs.file for handling the event of provisioning.
Hidden Optional Boolean. If TRUE hides the site definition from the Create Site dialog. Creation of sites with this definition through code will be still possible.
Allow global Feature associations Optional Boolean. If TRUE the site definition is allowed to be associated to global features.
Root Web Only Optional Boolean. If TRUE the site created from the configuration can only exist as the root Web site in a site collection. This attribute is not enforced in site templates (.stp files).
Sub Web Only Optional Boolean. If TRUE tthe site created from the configuration can only exist as a subsite within a site collection.

References

Authors

Version history

2.7.2. Master Page

Description

Adds a master page current selected project.

Arguments

Name Description
Name Required Text. Name of the Master Page. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title (friendly name) of the Master Page. Limited to 255 characters.
Description Optional Text. Description of the Master Page.

References

Authors

Version history

2.7.3. Page Layout

Description

Adds a page layout to the current selected project.

Recipe Description

The recipe creates a page layout, which can be made available in a publising site for a specific content type (i.e. news).
Page layouts dictate, along with master pages, the overall look and feel of your SharePoint Publishing site. Master pages contain controls that are shared across multiple page layouts, such as navigation, search, or language-preference for multilingual sites. Page layouts contain field controls and Web Parts.

Arguments

Name Description
Page Layout Content Type Required Content Type. Content Type of this Page Layout.
Name Required Text. Name of the Page Layout class file. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Title Required Text. Title (friendly name) of the Page Layout. Limited to 255 characters.
Description Optional Text. Description of the Page Layout.

References

Authors

Version history

 

2.8. Import

2.8.1. Import Content Type

Description

Imports an existing content type from a given SharePoint site

Arguments

Name Description
ID
Name
Description
Group
Version
Hidden
Read Only
Sealed

Authors

Version history

2.8.2. Import Content

Description

Imports content from SharePoint into the project

Recipe Description

When content is already configured in a testing environment which should be bdeployed to production, or just be secured before resetting the development machine, this recipe helps to import content from the local running WSS/MOSS.
The content is integrated into the project an can be also updated with this recipe, if necessary.

Arguments

Name Description
Export Name Required Text. Name of the export, e.g. ExportedWorkflows, ExportedDocuments etc. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Include Security Optional Boolean. TRUE to export security settings for all elements.
Include Versions Optional Boolean. TRUE to export all versions.
Export Method Choose the export method.
Exclude Dependencies Optional Boolean. TRUE to exclude the dependencies of the content.
Extract after import Optional Boolean. TRUE to extract the contents into the project.
Version Update Select version to update from previous imported.

Authors

Version history

2.8.3. Import .wsp solution

Description

Imports an existing WSP solution file into the project

Recipe Description

This recipes imports a single .wsp file from the local system into an existing project. To run the recipe an existing customization project is needed.

Arguments

Name Description
WSP File Select the wsp file to be imported into the current project

Authors

Version history

2.8.4. Import .wsp solution from local farm

Description

Imports an existing WSP solution from the local SharePoint farm into the project

Recipe Description

This recipes imports a single .wsp file from the local SharePoint farm into an existing project. To run the recipe an existing customization project is needed.

Arguments

Name Description
WSP Solution Select the wsp from the local farm for the import

Authors

Version history

2.8.5. Import List Instance

Description

Import list instance

Arguments

Name Description
Title Required Text. Title of the list in the schema.
Description Optional Text. Contains a description of the list.
Url Required Text. Returns the site-relative URL at which to place the list.
RootWebOnly Optional Boolean. TRUE to specify that the list created from the definition exists only in the root Web site of a site collection.
OnQuickLaunch Optional Boolean. TRUE to display lists created from the list definition on the Quick Launch bar.
QuickLaunchUrl Optional Text. Specifies the URL of the view page to open for the list through Quick Launch navigation.
Id Required Text. Specifies a unique identifier for the list instance. The integer must be unique across the Feature definition.

Authors

Version history

2.8.6. Import List Template

Description

Import list template

Arguments

Name Description
Name Required Text. Specifies the internal name of the list definition. No spaces or special characters can be used. This name is also used to find the folder that contains the Schema.xml file that defines the schema in use.
DisplayName Required Text. Specifies the display name of the list definition.
Description Optional Text. Provides a description of the list definition.
Type Optional Integer. Provides a unique identifier for the template. This identifier must be unique within the feature, but need not be unique across all feature definitions or site definitions.
Category Optional Text. Specifies the category with which to associate lists created through the list definition.
Sequence Optional Integer. Specifies the ordering priority to use for the list template on the Create page. If Sequence is not set, the template appears last in arbitrary order with any other templates that also lack a Sequence value. Two templates that specify the same sequence are sorted together in an arbitrary order.
Default in new sites Optional Boolean. TRUE to specify that new SharePoint sites will include this list.
OnQuickLaunch Optional Boolean. TRUE to display lists created from the list definition on the QuickLaunch bar.
DisableAttachments Optional Boolean. TRUE to specify that users can attach files to items in lists created through the template; otherwise, FALSE.
DisallowContentTypes Optional Boolean. TRUE to specify that content types can be managed on lists created through the template; otherwise, FALSE.
VersioningEnabled Optional Boolean. TRUE to specify that versioning is enabled by default in lists created through the template; otherwise, FALSE.
FolderCreation Optional Boolean. TRUE to enable folder creation within the list and to specify that the New Folder command appears on the New menu in list views; otherwise, FALSE.
EnableModeration Optional Boolean. TRUE to specify that content approval is enabled by default in lists created through the template; otherwise, FALSE.
Hidden Optional Boolean. TRUE to specify that the list definition is not available on the Create page for creating lists.
HiddenList Optional Boolean. TRUE to specify that a list created from the list definition is hidden.
Security Read Optional Text. Defines the item-level permissions in the list for users with sufficient permission to read or edit list items. The SecurityBits attribute contains a 2-digit string. The first digit in the string controls the read access; the second digit in the string controls the edit access.
Security Edit Optional Text. Defines the item-level permissions in the list for users with sufficient permission to read or edit list items. The SecurityBits attribute contains a 2-digit string. The first digit in the string controls the read access; the second digit in the string controls the edit access.
Name Optional URL. Specifies a URL to an icon used to represent a list.

Authors

Version history

2.8.7. Import Site Column

Description

Import a site column from the local SharePoint into the current selected feature

Arguments

Name Description
ID
Name
Display Name
Description
Group

Authors

Version history

2.8.8. Import .wsp solution

Description

Imports an existing WSP solution file into the project

Recipe Description

This recipes imports a single .wsp file from the local system into an existing project. To run the recipe an existing customization project is needed.

Arguments

Name Description
WSP File Select the wsp file to be imported into the current project

Authors

Version history

2.8.9. Import .wsp solution from local farm

Description

Imports an existing WSP solution from the local SharePoint farm into the project

Recipe Description

This recipes imports a single .wsp file from the local SharePoint farm into an existing project. To run the recipe an existing customization project is needed.

Arguments

Name Description
WSP Solution Select the wsp from the local farm for the import

Authors

Version history

2.8.10. Import Content Type

Description

Imports an existing content type from a given SharePoint site

Arguments

Name Description
ID
Name
Description
Group
Version
Hidden
Read Only
Sealed

Authors

Version history

2.8.11. Import Site Column

Description

Import a site column from the local SharePoint into the current selected feature

Arguments

Name Description
ID
Name
Display Name
Description
Group

Authors

Version history

2.8.12. Import List Template

Description

Import list template

Arguments

Name Description
Name Required Text. Specifies the internal name of the list definition. No spaces or special characters can be used. This name is also used to find the folder that contains the Schema.xml file that defines the schema in use.
DisplayName Required Text. Specifies the display name of the list definition.
Description Optional Text. Provides a description of the list definition.
Type Optional Integer. Provides a unique identifier for the template. This identifier must be unique within the feature, but need not be unique across all feature definitions or site definitions.
Category Optional Text. Specifies the category with which to associate lists created through the list definition.
Sequence Optional Integer. Specifies the ordering priority to use for the list template on the Create page. If Sequence is not set, the template appears last in arbitrary order with any other templates that also lack a Sequence value. Two templates that specify the same sequence are sorted together in an arbitrary order.
Default in new sites Optional Boolean. TRUE to specify that new SharePoint sites will include this list.
OnQuickLaunch Optional Boolean. TRUE to display lists created from the list definition on the QuickLaunch bar.
DisableAttachments Optional Boolean. TRUE to specify that users can attach files to items in lists created through the template; otherwise, FALSE.
DisallowContentTypes Optional Boolean. TRUE to specify that content types can be managed on lists created through the template; otherwise, FALSE.
VersioningEnabled Optional Boolean. TRUE to specify that versioning is enabled by default in lists created through the template; otherwise, FALSE.
FolderCreation Optional Boolean. TRUE to enable folder creation within the list and to specify that the New Folder command appears on the New menu in list views; otherwise, FALSE.
EnableModeration Optional Boolean. TRUE to specify that content approval is enabled by default in lists created through the template; otherwise, FALSE.
Hidden Optional Boolean. TRUE to specify that the list definition is not available on the Create page for creating lists.
HiddenList Optional Boolean. TRUE to specify that a list created from the list definition is hidden.
Security Read Optional Text. Defines the item-level permissions in the list for users with sufficient permission to read or edit list items. The SecurityBits attribute contains a 2-digit string. The first digit in the string controls the read access; the second digit in the string controls the edit access.
Security Edit Optional Text. Defines the item-level permissions in the list for users with sufficient permission to read or edit list items. The SecurityBits attribute contains a 2-digit string. The first digit in the string controls the read access; the second digit in the string controls the edit access.
Name Optional URL. Specifies a URL to an icon used to represent a list.

Authors

Version history

2.8.13. Import List Instance

Description

Import list instance

Arguments

Name Description
Title Required Text. Title of the list in the schema.
Description Optional Text. Contains a description of the list.
Url Required Text. Returns the site-relative URL at which to place the list.
RootWebOnly Optional Boolean. TRUE to specify that the list created from the definition exists only in the root Web site of a site collection.
OnQuickLaunch Optional Boolean. TRUE to display lists created from the list definition on the Quick Launch bar.
QuickLaunchUrl Optional Text. Specifies the URL of the view page to open for the list through Quick Launch navigation.
Id Required Text. Specifies a unique identifier for the list instance. The integer must be unique across the Feature definition.

Authors

Version history

 

2.9. Application Pages

2.9.1. Administration Page

Description

Add an administration page to the project inherited from LayoutsPageBase

Screens


Arguments

Name Description
Name Enter the name of the application page (without .aspx).
Title Enter the title of page (displayed on top of the page and in the title of the html).
Description Enter the description of page (displayed on top of the page).

References

Authors

Version history

2.9.2. Application Page

Description

Add a layouts page to the project inherited from LayoutsPageBase

Screens



Arguments

Name Description
Name Enter the name of the application page (without .aspx).
Title Enter the title of page (displayed on top of the page and in the title of the html).
Description Enter the description of page (displayed on top of the page).

References

Authors

Version history

2.9.3. Unrestricted Layouts Page

Description

Add a unsecured layouts page to the project inherited from LayoutsPageBase

Screens



Arguments

Name Description
Page Name Enter name of the application page without extension (.aspx)
Title Enter the title of page (displayed on top of the page and in the title of the html).
Description Enter the description of page (displayed on top of the page).
Allow Anonymous Access

References

Authors

Version history

 

2.10. ASP.NET

2.10.1. Create WSDL and DISCO

Description

Creates the wsdl and disco file

Screens



Authors

Version history

2.10.2. Webservice

Description

Adds a ASP.NET web service

Screens





Arguments

Name Description
Name Required String. Enter the name of the web service.
Description Required String. Enter the description of the web service.

References

Authors

Version history

2.10.3. Administration Web Service

Description

Adds a ASP.NET web service for administration

Arguments

Name Description
Name Required String. Enter the name of the web service.
Description Required String. Enter the description of the web service.

References

Authors

Version history

2.10.4. Delegate Control (.ASCX)

Description

Adds a delegate template with a asxc control

Recipe Description

* AdditionalPageHead * GlobalSiteLink0 * GlobalSiteLink1 * GlobalSiteLink2 * SmallSearchInputBox * TopNavigationDataSource * PublishingConsole * QuickLaunchDataSource

Arguments

Name Description
Name Required Text. Specifies the name of the control.
Sequence Optional Integer. Specifies the sequence number for the control, which determines whether the control is added to the control tree for a page. The control with the lowest sequence number is added to the tree.
Id Optional Text. Specifies the ID of the control, for example, "SmallSearchInputBox".

References

Authors

Version history

2.10.5. Delegate Control (.CS)

Description

Adds a delegate template with a webcontrol (.cs)

Recipe Description

* AdditionalPageHead * GlobalSiteLink0 * GlobalSiteLink1 * GlobalSiteLink2 * SmallSearchInputBox * TopNavigationDataSource * PublishingConsole * QuickLaunchDataSource

Arguments

Name Description
Name Required Text. Specifies the name of the control.
Sequence Optional Integer. Specifies the sequence number for the control, which determines whether the control is added to the control tree for a page. The control with the lowest sequence number is added to the tree.
Id Optional Text. Specifies the ID of the control, for example, "SmallSearchInputBox".

References

Authors

Version history

2.10.6. Http Handler

Description

Adds a http handler to the project and a feature to deploy the web.config modifications for the http handler

Arguments

Name Description
Http Handler Name Enter the class name of the Http handler.
Http Handler Path Enter path for which urls the http handler should be called, e.g. */_vti_bin/_vti_aut/author.dll

Authors

Version history

2.10.7. Http Module

Description

Adds a http module to the project and a feature to deploy the web.config modifications for the http handler

Recipe Description

The Http module assembly needs to be registered in web.config. Therefore the Http module needs to be added to a feature with scope WebApplication and the necessary activation code is added to the feature receiver of the selected feature.

Arguments

Name Description
Http Module Name

Authors

Version history

 

2.11. WebParts

2.11.1. SharePoint Web Part

Description

Adds a web part to the project derived from Microsoft.SharePoint.WebPartPages.WebPart

Recipe Description

Web Parts are server-side controls that run inside the context of special pages (that is, Web Part Pages) within an ASP.NET application or a Windows SharePoint Services site.
They are the "building blocks" of pages in Windows SharePoint Services.
Windows SharePoint Services includes built-in Web Parts that you can use as soon as you have installed the product.
In addition, you can build your own Web Parts and deploy them to the server. (MSDN)

Arguments

Name Description
Web Part Name Enter the name of the web part. The name will be used for the class name (.cs).
Web Part Title Enter the title of the web part (displayed in the web part gallery as web part title).
Web Part Description Enter the description of the web part (displayed in the web part gallery as web part description).
Group Enter the group in which the web part should appear in web part gallery.
QuickAdd Group Enter the quick add group in which the web part should appear when the user wants to add a web part to a page.

References

Authors

Version history

2.11.2. ASP Web Part

Description

Adds a web part to the project derived from System.Web.UI.WebControls.WebParts.WebPart

Recipe Description

Adds a web part to the project derived from System.Web.UI.WebControls.WebParts.WebPart
Creating this kind of webpart allows reuse in non-SharePoint ASP WebPages, but also lacks the SharePoint specific additions, like caching.

Arguments

Name Description
Web Part Name Enter the name of the web part. The name will be used for the class name (.cs).
Web Part Title Enter the title of the web part (displayed in the web part gallery as web part title).
Web Part Description Enter the description of the web part (displayed in the web part gallery as web part description).
Group Enter the group in which the web part should appear in web part gallery.
QuickAdd Group Enter the quick add group in which the web part should appear when the user wants to add a web part to a page.

References

Authors

Version history

2.11.3. Ajax Web Part

Description

Adds a Ajax web part to the project

Recipe Description

This recipe adsda an Ajax enabled webpart to your project.
Postback will be handled without loading the entire page. Note: AJAX.net has to be installed on the server.

Arguments

Name Description
Web Part Name Enter the name of the web part. The name will be used for the class name (.cs).
Web Part Title Enter the title of the web part (displayed in the web part gallery as web part title).
Web Part Description Enter the description of the web part (displayed in the web part gallery as web part description).
Group Enter the group in which the web part should appear in web part gallery.
QuickAdd Group Enter the quick add group in which the web part should appear when the user wants to add a web part to a page.

References

Authors

Version history

2.11.4. Visual Web Part

Description

Adds a smart part to the project

Recipe Description

Creates a new webpart based on the SmartPart project.
The SharePoint web part which can host any ASP.NET web user control.

Arguments

Name Description
Web Part Name Enter the name of the web part. The name will be used for the class name (.cs).
Web Part Title Enter the title of the web part (displayed in the web part gallery as web part title).
Web Part Description Enter the description of the web part (displayed in the web part gallery as web part description).
Group Enter the group in which the web part should appear in web part gallery.
QuickAdd Group Enter the quick add group in which the web part should appear when the user wants to add a web part to a page.

References

Authors

Version history

2.11.5. Simple Filter Consumer Web Part

Description

Adds a filter web part to the project

Recipe Description

Windows SharePoint Services 3.0 uses the ASP.NET Web Part connection framework to connect Web Parts to each other programmatically.
Filter Web Parts use this connectivity support to provide filter criteria to other Web Parts.
Developers can now allow users to provide search or filter criteria.
Web Part connections are based on the concepts of "providers" and "consumers."
A provider Web Part supplies information to one or more consumer Web Parts through a programmatic interface. (MSDN)

Arguments

Name Description
Web Part Name Enter the name of the web part. The name will be used for the class name (.cs).
Web Part Title Enter the title of the web part (displayed in the web part gallery as web part title).
Web Part Description Enter the description of the web part (displayed in the web part gallery as web part description).
Group Enter the group in which the web part should appear in web part gallery.
QuickAdd Group Enter the quick add group in which the web part should appear when the user wants to add a web part to a page.

References

Authors

Version history

2.11.6. Filter Provider Web Part

Description

Sample filter provider web part to provide multiple values (MSDN sample)

Recipe Description

Windows SharePoint Services 3.0 uses the ASP.NET Web Part connection framework to connect Web Parts to each other programmatically.
Filter Web Parts use this connectivity support to provide filter criteria to other Web Parts.
Developers can now allow users to provide search or filter criteria.
Web Part connections are based on the concepts of "providers" and "consumers."
A provider Web Part supplies information to one or more consumer Web Parts through a programmatic interface. (MSDN)

Arguments

Name Description
Web Part Name Enter the name of the web part. The name will be used for the class name (.cs).
Web Part Title Enter the title of the web part (displayed in the web part gallery as web part title).
Web Part Description Enter the description of the web part (displayed in the web part gallery as web part description).
Group Enter the group in which the web part should appear in web part gallery.
QuickAdd Group Enter the quick add group in which the web part should appear when the user wants to add a web part to a page.

References

Authors

Version history

2.11.7. Filter Consumer Web Part

Description

Sample filter consumer web part to consumer multiple values (MSDN sample)

Recipe Description

Windows SharePoint Services 3.0 uses the ASP.NET Web Part connection framework to connect Web Parts to each other programmatically.
Filter Web Parts use this connectivity support to provide filter criteria to other Web Parts.
Developers can now allow users to provide search or filter criteria.
Web Part connections are based on the concepts of "providers" and "consumers."
A provider Web Part supplies information to one or more consumer Web Parts through a programmatic interface. (MSDN)

Arguments

Name Description
Web Part Name Enter the name of the web part. The name will be used for the class name (.cs).
Web Part Title Enter the title of the web part (displayed in the web part gallery as web part title).
Web Part Description Enter the description of the web part (displayed in the web part gallery as web part description).
Group Enter the group in which the web part should appear in web part gallery.
QuickAdd Group Enter the quick add group in which the web part should appear when the user wants to add a web part to a page.

References

Authors

Version history

 

2.12. Workflows

2.12.1. Sequential Workflow (ASPX Forms)

Description

Adds a sequential workflow with optional ASPX forms to the project

Recipe Description

Although the out of the box workflows of MOSS/WSS might meet most needs, sometimes it is necessaryto create your own workflow.
Visual Studio provides already a graphical workflow editor which helps you desgin the desired process.
This recipe helps to deploy such a workflow to SharePoint and attach it to Content Types or Lists.

Arguments

Name Description
Workflow Name Required Text. Internal name of the workflow. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.
Workflow Title Required Text. Display name of the workflow. Limited to 255 characters.
Workflow Description Required Text. Longer description of the workflows purpose.
Workflow ID Required GUID. The GUID will be autogenerated by the recipe, but can be customized if neccesary.
Create Association Form Optional Boolean. TRUE to create an association form.
Create Initiation Form Optional Boolean. TRUE to create an initiation form.
Create Modification Form Optional Boolean. TRUE to create an modification form.
Create Task Form Optional Boolean. TRUE to create an task form.
Workflow Task Content Type Required Content Type. Choose the content type of the task.
Create Custom Content Type Required Boolean. TRUE to create a custom content type.

References

Authors

Version history

 

2.13. Advanced

2.13.1. Minimal CAS

Description

Adds a minimal Code Access Security policy

Authors

Version history

 

2.14. Help

2.14.1. Recipe Index

Description

Authors

Version history

 

3. Snippets

  • Add Property with choices Code snippet to add a custom user profile property with predefined choices
  • Sites

  • Attach event receiver tow eb Adds a event receiver to a web
  • Security

  • Add RunWithElevatedPrivileges Adds SPSecurity.RunWithElevatedPrivileges section
  • DocumentLists

  • Attach event receiver to ContentType Adds a site column to a content type
  • Attach event receiver to List Adds a event receiver to list
  • DocumentLists

  • Attach event receiver to ContentType Adds a site column to a content type
  • Attach event receiver to List Adds a event receiver to list
  • ContentTypes

  • Add SiteColumn to ContentType Adds a site column to a content type
  • UserProfiles

    Developed by SharePoint Consultants of Steria Mummert
    Version: 2.4.3

    3.1. UserProfiles

    3.1.1. Add Property with choices

    Description
    Code snippet to add a custom user profile property with predefined choices
    Author
    Torsten Mandelkow
    HelpUrl
    Snippet Code


    UserProfileManager $profileManager$ = new UserProfileManager(ServerContext.GetContext(site));

    Property $property$ = $profileManager$.Properties.GetPropertyByName("IntranetLanguage");
    if (p == null)
    {
    Property property = profileManager.Properties.Create(false);
    property.Type = PropertyDataType.String;
    property.Name = "$PropertyName$";
    property.DisplayName = "IntranetLanguage";
    property.Length = 200;
    property.DefaultPrivacy = Privacy.Organization;
    property.PrivacyPolicy = PrivacyPolicy.OptIn;
    property.IsUserEditable = true;
    property.ChoiceType = ChoiceTypes.Closed;
    string[] SampleChoiceList = new string[] { "option1", "option2" };
    foreach (string choice in SampleChoiceList)
    {
    property.ChoiceList.Add(choice);
    }
    property.Commit();
    }


    Developed by SharePoint Consultants of Steria Mummert
    Version: 2.4.3
     

    3.2. Sites

    3.2.1. Attach event receiver tow eb

    Description
    Adds a event receiver to a web
    Author
    Torsten Mandelkow
    HelpUrl
    Snippet Code


    using (SPSite site = new SPSite(strUrl))
    {
    using (SPWeb web = site.OpenWeb())
    {
    SPEventReceiverDefinitionCollection receivers = web.EventReceivers;

    SPEventReceiverDefinition def = receivers.Add();
    def.Name = "MyEventReceiver";
    def.Assembly = "MyEventReceiver, Version=1.0.0.0, Culture=neutral,
    PublicKeyToken=[public key token]";
    def.Class = "MyEventReceiver.StopDeleteAction";
    def.Type = SPEventReceiverType.WebDeleting;
    def.SequenceNumber = 10020;
    def.Update();

    Console.WriteLine("Registration of event " + def.Name + " for url "
    + strUrl + " successful");
    }
    }
    Developed by SharePoint Consultants of Steria Mummert
    Version: 2.4.3
     

    3.3. Security

    3.3.1. Add RunWithElevatedPrivileges

    Description
    Adds SPSecurity.RunWithElevatedPrivileges section
    Author
    Torsten Mandelkow
    HelpUrl
    Snippet Code


    SPSecurity.RunWithElevatedPrivileges(delegate()
    {
    // do things assuming the permission of the "system account"
    });

    Developed by SharePoint Consultants of Steria Mummert
    Version: 2.4.3
     

    3.4. DocumentLists

    3.4.1. Attach event receiver to ContentType

    Description
    Adds a site column to a content type
    Author
    Torsten Mandelkow
    HelpUrl
    Snippet Code


    using System.Reflection;

    #
    using (SPSite siteCollection = (SPSite) properties.Feature.Parent)
    #
    {
    #
    using (SPWeb site = siteCollection.OpenWeb())
    #
    {
    #
    SPContentType contentType = site.AvailableContentTypes["Document"];
    #
    Assembly assembly = Assembly.GetExecutingAssembly();
    #
    SPEventReceiverDefinition reciever = contentType.EventReceivers.Add();
    #
    reciever.Name = "example_Name";
    #
    reciever.Type = SPEventReceiverType.ItemUpdated;
    #
    reciever.SequenceNumber = 10000;
    #
    reciever.Assembly = string.Format("{0},{1},{2},{3}", assembly.GetName().FullName, assembly.GetName().Version, assembly.GetName().CultureInfo, assembly.GetName().GetPublicKey());
    #
    reciever.Class = "example_Class_Name";
    #
    reciever.Update();
    #
    }
    #
    }

    Developed by SharePoint Consultants of Steria Mummert
    Version: 2.4.3

    3.4.2. Attach event receiver to List

    Description
    Adds a event receiver to list
    Author
    Torsten Mandelkow
    HelpUrl
    Snippet Code


    SPWeb web = properties.Feature.Parent as SPWeb;
    web.Lists["Rating History"].EventReceivers.Add(
    SPEventReceiverType.ItemAdded,
    "Dhunter.SharePoint.Eventhandlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0a26195ff03df1fd",
    "Dhunter.SharePoint.Eventhandlers.RatingSummaryEventHandler");

    Developed by SharePoint Consultants of Steria Mummert
    Version: 2.4.3
     

    3.5. ContentTypes

    3.5.1. Add SiteColumn to ContentType

    Description
    Adds a site column to a content type
    Author
    Torsten Mandelkow
    HelpUrl
    Snippet Code


    SPSite site = properties.Feature.Parent as SPSite;
    SPContentTypeId cTypeId = site.RootWeb.ContentTypes.BestMatch(new SPContentTypeId(contentTypeId));
    SPContentType cType = site.RootWeb.ContentTypes[cTypeId];

    if (!contentType.Fields.ContainsField(field.Title))
    {
    contentType.FieldLinks.Add(new SPFieldLink(field));
    contentType.Update();
    }

    Developed by SharePoint Consultants of Steria Mummert
    Version: 1.2.0
     

    3.6. DocumentLists

    3.6.1. Attach event receiver to ContentType

    Description
    Adds a site column to a content type
    Author
    Torsten Mandelkow
    HelpUrl
    Snippet Code


    using System.Reflection;

    #
    using (SPSite siteCollection = (SPSite) properties.Feature.Parent)
    #
    {
    #
    using (SPWeb site = siteCollection.OpenWeb())
    #
    {
    #
    SPContentType contentType = site.AvailableContentTypes["Document"];
    #
    Assembly assembly = Assembly.GetExecutingAssembly();
    #
    SPEventReceiverDefinition reciever = contentType.EventReceivers.Add();
    #
    reciever.Name = "example_Name";
    #
    reciever.Type = SPEventReceiverType.ItemUpdated;
    #
    reciever.SequenceNumber = 10000;
    #
    reciever.Assembly = string.Format("{0},{1},{2},{3}", assembly.GetName().FullName, assembly.GetName().Version, assembly.GetName().CultureInfo, assembly.GetName().GetPublicKey());
    #
    reciever.Class = "example_Class_Name";
    #
    reciever.Update();
    #
    }
    #
    }

    Developed by SharePoint Consultants of Steria Mummert
    Version: 2.4.3

    3.6.2. Attach event receiver to List

    Description
    Adds a event receiver to list
    Author
    Torsten Mandelkow
    HelpUrl
    Snippet Code


    SPWeb web = properties.Feature.Parent as SPWeb;
    web.Lists["Rating History"].EventReceivers.Add(
    SPEventReceiverType.ItemAdded,
    "Dhunter.SharePoint.Eventhandlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0a26195ff03df1fd",
    "Dhunter.SharePoint.Eventhandlers.RatingSummaryEventHandler");

    Developed by SharePoint Consultants of Steria Mummert
    Version: 2.4.3
     

    3.7. ContentTypes

    3.7.1. Add SiteColumn to ContentType

    Description
    Adds a site column to a content type
    Author
    Torsten Mandelkow
    HelpUrl
    Snippet Code


    SPSite site = properties.Feature.Parent as SPSite;
    SPContentTypeId cTypeId = site.RootWeb.ContentTypes.BestMatch(new SPContentTypeId(contentTypeId));
    SPContentType cType = site.RootWeb.ContentTypes[cTypeId];

    if (!contentType.Fields.ContainsField(field.Title))
    {
    contentType.FieldLinks.Add(new SPFieldLink(field));
    contentType.Update();
    }

    Developed by SharePoint Consultants of Steria Mummert
    Version: 2.4.3
     

    4. License

    GNU General Public License version 2 (GPLv2)



    Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

    Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

    Preamble

    The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.

    When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.

    To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.

    For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

    We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.

    Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.

    Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.

    The precise terms and conditions for copying, distribution and modification follow.

    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

    0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".

    Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.

    1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

    You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

    2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.

    c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)

    These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

    Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.

    In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

    3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)

    The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

    If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.

    4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

    5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.

    6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.

    7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.

    If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.

    It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

    This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

    8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

    9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

    Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.

    10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

    NO WARRANTY

    11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

    12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.