Home
Features
MOSS Tutorials
Contact Us
Mission
  


Feature Deployment

Multisymmetric Incorporated

 ‭(Hidden)‬ ContentPlaceHolders






























Instruction on deployment of features in MOSS is covered in the SDK

Instruction on deployment of features in MOSS is covered in the SDK.

To deploy this feature create a directory “myHorizEdit” in the path listed below.

 

\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES

 

Create file feature.xml:

<?xml version="1.0" encoding="utf-8" ?>

<!-- _lcid="1033" _version="12.0.4017" _dal="1" -->

<!-- _LocalBinding -->

<Feature Id="77843BC3-9ED8-438f-84D0-18AE37AB933C"

Title="Horizontal Edit Feature"

Description="Edit form in horizontally"

Version="1.0.0.0"

Scope="Site"

xmlns="http://schemas.microsoft.com/sharepoint/">

<ElementManifests>

     <ElementManifest Location="sColumns.xml" />

     <ElementManifest Location="cType.xml" />

</ElementManifests>

</Feature>

Note: use guidgen tool to create unique Id, and remove the brackets. This will also be used to generate unique ContentType ID & Field ID below:

 

Create file sColumns.xml

 

 

<?xml version="1.0" encoding="utf-8" ?>

<!-- _lcid="1033" _version="12.0.4017" _dal="1" -->

<!-- _LocalBinding -->

<!--

-->

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

<Field ID="{CC67C6F3-1519-463c-8EB5-DBB30F73A0EF}"

Name="myCustomText"

SourceID="http://schemas.microsoft.com/sharepoint/v3"

StaticName="myCustomText"

Group="myGroup"

RowOrdinal="0"

Type="Text"

DisplayName="Text Column" />

<Field ID="{E3F01815-7011-4386-AB44-8D100CAAA677}"

Name="myCustomNote"

SourceID="http://schemas.microsoft.com/sharepoint/v3"

StaticName="myCustomNote"

Group="myGroup"

RowOrdinal="0"

Type="Note" NumLines="3"

DisplayName="Text Note" />

<Field ID="{10B2A9AB-2E92-4625-BF72-FF8EB5E44476}"

Name="myCustomDate"

SourceID="http://schemas.microsoft.com/sharepoint/v3"

StaticName="myCustomDate"

Group="myGroup"

RowOrdinal="0"

Type="DateTime" Format="DateOnly"

DisplayName="Date Only" />

</Elements>

The ContentType ID is broken into three section:

ID="0x0102 00 27D3DC756C694e229D3F6275117850E4"

The last part is the generated Guid with only Hex characters. The first part of the Id is the Base content type 0x0102 with is an Calendar (Event) type list.

 

Each content type is delimited by 00.

 

This content type is using the base Events list and adding three additional site columns created to the left. To create other content types change the base content type Id to inherit their fields.

 

Create file cType.xml

 

 

<?xml version="1.0" encoding="utf-8" ?>

<!-- _lcid="1033" _version="12.0.4017" _dal="1" -->

<!-- _LocalBinding -->

<!--

-->

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

<ContentType ID="0x01020027D3DC756C694e229D3F6275117850E4"

Name="myContentType"

Group="myGroup"

     Description="Horizontal Event Edit form."

     Version="0">

<FieldRefs>

<FieldRef ID="{CC67C6F3-1519-463c-8EB5-DBB30F73A0EF}" Name="myCustomText" />

<FieldRef ID="{E3F01815-7011-4386-AB44-8D100CAAA677}" Name="myCustomNote" />

<FieldRef ID="{10B2A9AB-2E92-4625-BF72-FF8EB5E44476}" Name="myCustomDate" />

</FieldRefs>

<XmlDocuments>

<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">

<FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">

<Display>ListForm</Display>

<Edit>myHorizEdit</Edit>

<New>ListForm</New>

</FormTemplates>

</XmlDocument>

</XmlDocuments>

</ContentType>

</Elements>

The XmlDocument specifies which template to use for either the Display, Edit, or New form.

 

To deploy feature:

stsadm -o installfeature -filename myHorizEdit\feature.xml force

stsadm -o activatefeature -filename myHorizEdit\feature.xml -url http://<site>

 

This will add content type to site, the next step is to create a Calendar List and modify settings to use:

This will now give you the option to add additional Content Types and remove the base Content Type:

 

Please notice after all this work everything is the same, this is because the myHorizEdit.ascx control is a copy of the ListForm, but to verify deployment edit myHorizEdit.ascx and remove: <SharePoint:ListFieldIterator runat="server"/>

 

IISRESET, and notice the edit gives you nothing to edit, will do that next in the custom web part.

 

 

microsoft Certified Partner