Condividi tramite


Predefined Alert Templates

Applies to: SharePoint Foundation 2010

Microsoft SharePoint Foundation alert templates define the content and appearance of alerts. Templates for e-mail alerts are defined in AlertTemplates.xml and templates for SMS alerts are defined in AlertTemplates_SMS.xml. Both files are located in the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\Template\XML folder. A template specifies the content and formatting of a message for each of several types of events, such as the item changed event or item deleted event.

Note

Do not modify AlertTemplates.xml or AlertTemplates_SMS.xml. To make changes, make a copy of one or both files, edit the copy, and then make one or two calls of the stsadm -o updatealerttemplates command to override the original templates with your changes. Your changes are stored in the SharePoint Foundation configuration database. For details, see Alerts Overview and AlertTemplates Schema.

Predefined Alert Templates

SharePoint Foundation ships with the e-mail templates shown in Table 1 defined in AlertTemplates.xml. An identical list of SMS templates is defined in AlertTemplates_SMS.xml. The names of the SMS templates are the same as their e-mail counterparts, except that "Sms" is inserted between the "SP" and the "Alert". For example, SPSmsAlertTemplateType.GenericList is the SMS counterpart to the e-mail template SPAlertTemplateType.GenericList.

A particular alert template is defined with an AlertTemplate element. The SMS templates are identical to the e-mail templates in their AlertTemplate markup except for the child Format element.

Important

If you make a change to a given SPAlertTemplateType.* template outside of the Format element, you must make the same change to the corresponding SPSmsAlertTemplateType.* template.

The primary way that the Format element in an SPSmsAlertTemplateType.* template differs from the Format element in the corresponding SPAlertTemplateType.* template is that the style and rendering information is not included in the SMS template because SMS messages are sent as unformatted text. Moreover, SMS messages do not have a subject line and they have only a message body with no message header or message footer.

Table 1. Predefined alert templates

Alert Template Name

Description

SPAlertTemplateType.GenericList

The first alert template in AlertTemplates.xml. GenericList is used unless there is a match to one of other list types.

SPAlertTemplateType.DocumentLibrary

Notification of changes in document libraries.

SPAlertTemplateType.WebPageLibrary

Notification of changes in Web page libraries.

SPAlertTemplateType.Survey

Notification of changes in surveys.

SPAlertTemplateType.Links

Notification of changes in links.

SPAlertTemplateType.Announcements

Notification of changes in announcements.

SPAlertTemplateType.Contacts

Notification of changes in contacts.

SPAlertTemplateType.Events

Notification of changes in events.

SPAlertTemplateType.Tasks

Notification of changes in tasks.

SPAlertTemplateType.DiscussionBoard

Notification of changes in discussion boards.

SPAlertTemplateType.PictureLibrary

Notification of changes in picture libraries.

SPAlertTemplateType.XMLForm

Notification of changes in XML form.

SPAlertTemplateType.DataConnectionLibrary

Notification of changes in data connection libraries.

SPAlertTemplateType.AssignedtoNotification

Assigned to task list and issue list notifications.

See Also

Concepts

Alerts in SharePoint Foundation

AlertTemplates Schema