Generating MOSS Features with CTFC (Content Type Feature Creator)

 

Features for Content Types and Site Columns can be quickly generated by using CTFC. There are basically two main steps involved:

  1. Create features by using the MOSS 2007 User Interface
  2. Generate features based on what I had created.

Please note however that in this version (1.1) is not tested rigidly. It is more a prove of concept, to demonstrate and evaluate the possibilities and limitations.

I will now explain the steps in a little more detail.

 

1       Create features by using the MOSS 2007 User Interface

This is the process by which a power user might create a user from the MOSS 2007 user interface. A number of different options exist for creating the Content Type,  some of which are supported out of the box, and some are not.

Supported are the inheritance of existing Content Types, and the usage of newly created Custom Site columns, for which a separate feature will be generated.

Some other advanced properties have not been tested, for instance the coupling to a workflow.

 

The creation of custom site columns and content types in the user interface is described by a number of people, for instance Shady KhorShed at http://shadiesm.blogspot.com/2007/11/moss-create-site-column.html, or Jan Tielens at http://weblogs.asp.net/jan/archive/2006/05/09/445763.aspx

 

 

2 Generate features based on what I had created.

The generation of features from the stuff you created in the MOSS user interface involves two steps.

 

Database form

In the database form, data for columns and content types is retrieved from the database by following steps:

  • a) Specify the path to your content database, You can find this path by opening the Central Administration, selecting Application Management, then "Create New Web Application" and finding the server name. This is a bit counterintuitive, but you can not find the server by inspecting the existing web application(s). Then, again from the Application Management tab, select Content Databases. Select the web application, and you'll get the content database(s). If you provided logical names, you'll see here which one is your target.
  • b) Press "Load", and if your connectionstring was OK, you'll see content types and columns you created in step 1, appear in the lists.
  • c) Select the content type for which you want to create a feature and press the Next button. The feature form will now open.

 

Feature form

In the features form, you see the properties of both the custom columns and the content type features.

  • a) Optionally you may change the settings supplied;
  • b) Select a path to create the feature to
  • c) Press the Create Features button and the features will be created to the specified path

 

 In the attachment you will find the executable program, help file and sources

 Alfred

 


Posted on SharePoint Blogs Del.icio.us | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Read the complete post at http://www.sharepointblogs.com/alfred/archive/2008/01/29/generating-moss-features-with-ctfc-content-type-feature-creator.aspx

Published Tuesday, January 29, 2008 2:33 PM by SharePoint Blogs