Navigate Up
Sign In
Supporters of Developer
Web

Customizing Alert Templates in SharePoint Foundation 2010

Item is currently unrated. Press SHIFT+ENTER to rate this item.1 star selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+ESCAPE to leave rating submit mode.2 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.3 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.4 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.5 stars selected. Press SHIFT+ENTER to submit. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.
Customizing Alert Templates in SharePoint Foundation 2010

Customizing Alert Templates in SharePoint Foundation 2010

Out of the box templates

SharePoint Foundation includes Pre-defined alert templates for e-mail and SMS messages

Pre-defined Alert Template Location: %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\XML

Email Template: AlertTemplates.xml
SMS Template: AlertTemplates_SMS.xml

Template includes information such as the format, contents and properties for the alert email and SMS messages.

Customize alerts

(1) Create a copy of the xml template file that you need to change - AlertTemplates.xml and AlertTemplates_SMS.xml

(2) Modify the copy of the alert template file - (The original template file should not be modified)

You can make changes to the template such as add a button/link, include an image or privacy information, modify the look of the alert etc.
To customize the appearance of alerts, modify the css by using the Format element.

Resource variables listed within the template definition file, such as $Resources:Alerts_anything_filter_shortname, can be found in core.resx (in the local_drive\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources folder)

If you are modifying any element other than the Format element, both the email and the SMS templates should be modified, in parallel - the 2 templates should be in sync except for the Format element.

(3) Load the custom templates by using the command: stsadm -o updatealerttemplates. I haven't found a direct equivalent Powershell command.

If both, the email and the SMS template are updated, the UpdateAlertTemplates command needs to be run twice, once for each of the two files.

(4) Restart IIS

(5) The SharePoint Timer service may need to be restarted.

Resources
Alert Template Schema: http://msdn.microsoft.com/en-us/library/bb802961(office.14).aspx 

Categories:
No categories were selected

Comments

Marina Carreira

Change text alert

Hello I wonder how do I change the text in sharepoint alert when changes occur in the new document, document, for example, modified or deleted document. I wish that this text contains the file name and link to the page where the folder is located. I would also create an alert that will only be sent a notification when a file is approved and also edit your text. thank you

Posted 08-Dec-2011 by Marina Carreira
Mike

third party tool for sharepoint alerts customization

along with manually customization of sharepoint alert templates, probably some SP admins will be interested in special tool for that to avoid complicated programming: http://www.harepoint.com/Products/HarePointCustomAlerts/Default.aspx

Posted 22-Apr-2013 by Mike
jls

GetVar tags

Hi, I know these tags read information from SharePoint but where are they defined? e.g.  <GetVar Name="ListUrl" URLEncodeAsURL="TRUE"/> will get the library URL of where the alert is defined. Is there a list of those vars somewhere?

Posted 26-Feb-2014 by jls

Notify me of comments to this article

E-mail:
   

Add Comment

Title:

 
Comment:
Email:

   


Name:

 
Url: