Defines a single custom action for a link or toolbar item.

<CustomAction
  ContentTypeId = "Text"
  ControlAssembly = "Text"
  ControlClass = "Text"
  ControlSrc = "Text"
  Description = "Text"
  GroupId = "Text"
  Id = "Text"
  ImageUrl = "Text"
  Location = "Text"
  RegistrationId = "Text"
  RegistrationType = "Text"
  RequireSiteAdministrator = "TRUE" | "FALSE"
  Rights = "Text"
  Sequence = "Integer"
  ShowInLists = "TRUE" | "FALSE"
  ShowInReadOnlyContentTypes = "TRUE" | "FALSE"
  ShowInSealedContentTypes = "TRUE" | "FALSE"
  Title = "Text">
</CustomAction>
Attribute Description

ContentTypeId

Optional Text. Specifies the ID of a content type to associate with the custom action.

ControlAssembly

Optional Text. Specifies the assembly of a control that supports the custom action.

ControlClass

Optional Text. Specifies a control class that supports the custom action.

ControlSrc

Optional Text. Specifies the relative URL of the .ascx file that serves as the source for the custom action, for example, "~/_controltemplates/myCustomAction.ascx".

Description

Optional Text. Specifies a longer description for the action that is exposed as a tooltip or sub-description for the action.

GroupId

Optional Text. Identifies an action group that contains the action, for example, "SiteManagement". If contained within a custom action group, the value of the GroupId attribute must equal the group ID of the CustomActionGroup element.

See Default Custom Action Locations and IDs for a list of the default custom action group IDs that are used in Windows SharePoint Services.

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". See Default Custom Action Locations and IDs for a list of the default custom action IDs that are used in Windows SharePoint Services.

ImageUrl

Optional Text. Specifies a virtual server relative link to an image that presents an icon for the item.

Location

Optional Text. Specifies the location of this custom action, for example, "Microsoft.SharePoint.SiteSettings". If the custom action is a menu item or toolbar button, then the possible options include EditControlBlock, NewFormToolbar, DisplayFormToolbar, and EditFormToolbar.

If contained within a custom action group, the value of the Location attribute must equal the location of the CustomActionGroup element.

See Default Custom Action Locations and IDs for a list of the default custom action locations that are used in Windows SharePoint Services.

RegistrationId

Optional Text. Specifies the identifier of the list or item content type that this action is associated with, or the file type or programmatic identifier (ProgID).

RegistrationType

Optional Text. Specifies the registration attachment for a per-item action. Possible values include:

  • ContentType

  • FileType

  • List

  • ProgId

RequireSiteAdministrator

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, for example, "ViewListItems,ManageAlerts". If not specified, then the action always appears in the list of actions. To specify multiple rights, separate the values by using commas. The set of rights are grouped logically according to AND logic, which means that a user must have all the specified rights to see an action. For a list of possible values, see Microsoft.SharePoint.SPBasePermissions.

Sequence

Optional Integer. Specifies the ordering priority for actions.

ShowInReadOnlyContentTypes

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.

ShowInSealedContentTypes

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.

Title

Required Text. Specifies the end user description for this action.

Minimum: 1

Maximum: Unbounded

You can use the CustomAction element to add standard ASP.NET controls and user controls (for example, text boxes or option buttons) as custom actions in toolbars. However, you can only add controls instantiating menu items to the drop-down menus of toolbars; you cannot add Web Parts or arbitrary controls.

 

 

List definitions Type and BaseType

One if the interesting topics in SharePoint customizations is developing customized list definitions to be integrated later on within you site definitions.During list definitions development you are required to determine two important values "Type" and "BaseType", following is a description for the available types (available in the WSS SDK)

Type:

Value   Description

-1     InvalidType

100   Generic list     //列表

101   Document library //文档库

102   Survey           //调查

103   Links list       //网站链接

104   Announcements list

105   Contacts list

106   Events list

107   Tasks list      //任务

108   Discussion board //讨论板

109   Picture library

110   Data sources

111   Site template gallery

113   Web Part gallery

114  List template gallery

115  XML Form library

120  Custom grid for a list

200  Meeting Series list

201  Meeting Agenda list

202  Meeting Attendees list

204  Meeting Decisions list

207  Meeting Objectives list

210  Meeting text box

211  Meeting Things To Bring list

212  Meeting Workspace Pages list

300   Portal Sites list.

1100  Issue tracking

2002  Personal document library

2003  Private document library

BaseType

0 — Custom List

1 — Document Library

2 — Not used

3 — Discussion Forum

4 — Surveys

5 — Issues List

so, if you are developing custom picture library set Type="109" and BaseType="1" (because picture library mainly based on document library)

another example if your are developing custom Calendar list definition set Type="100" BaseType="0".