Modifying the Appearance of Alerts

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

You can customize the appearance of alert notifications by modifying the associated cascading style sheets by using the Format element of each template.

In addition to the formatting styles that are defined in the Format element, alert templates include formatting instructions for user interface elements, such as the Modify my alert settings, Mobile View, and View list buttons, which can be modified or removed.

Modify my alert settings button

The following code displays the Modify my alert settings button:

<GetVar Name="MySubsUrl" URLEncodeAsURL="TRUE"/>
      <td class="toolbarsep">|</td>]]>

View list URL button

The following code displays the List URL button:

<GetVar Name="ListUrl" URLEncodeAsURL="TRUE" />
  <![CDATA[">$Resources:Alerts_link_view; ]]>
<GetVar Name="ListName" HTMLEncode="TRUE" />

Mobile View button

The following code displays the Mobile View button:

  <Expr><GetVar Name="MobileUrl"/></Expr>
  <Case Value = "NULL"/>
          <td class="toolbarsep">|</td>
          <td class="toolbarbutton"><a href="]]>
    <GetVar Name="MobileUrl" />

Steps to Modify Buttons on the Alert Email

You can use any XML editing tool to edit the templates.

To edit a template

  1. Create a working copy of AlertTemplates.xml.


    Remember to always modify a copy of Alerttemplates.xml, not Alerttemplates.xml itself.

  2. Edit the working copy that you just created. Make changes or remove button code as desired.

  3. Use the STSADM command to read the changed templates into the database.

    STSADM -o updatealerttemplates -url url -filename name_of_working_copy
  4. Restart Internet Information Server.


    You might need to restart the SharePoint Timer Service.

Additional Resources

Alerts in Windows SharePoint Services

Stsadm Command-Line Tool