Export (0) Print
Expand All

Modifying the Appearance of Alerts

Last modified: November 19, 2010

Applies to: SharePoint Foundation 2010

In this article
Modify my alert settings Button
View list URL Button
Mobile View Button
Steps to Modify Buttons on the Alert E-mail
Additional Resources

You can customize the appearance of e-mail alert notifications by modifying the associated cascading style sheets by using the Format element of each alert template. For more information about alert templates, see Predefined Alert Templates.

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.

The following code displays the Modify my alert settings button:

<GetVar Name="MySubsUrl" URLEncodeAsURL="TRUE"/>
<HTML><![CDATA[
      ">$Resources:Alerts_link_modify;</a></td>
      <td class="toolbarsep">|</td>]]>
</HTML>

The following code displays the List URL button:

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

The following code displays the Mobile View button:

<Switch>
  <Expr><GetVar Name="MobileUrl"/></Expr>
  <Case Value = "NULL"/>
  <Default>
    <HTML><![CDATA[
          <td class="toolbarsep">|</td>
          <td class="toolbarbutton"><a href="]]>
    </HTML>
    <GetVar Name="MobileUrl" />
    <HTML><![CDATA[
           ">$Resources:Alerts_mobile_view;</a></td>]]>
    </HTML>
  </Default>
</Switch>

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

To edit a template

  1. Create a working copy of AlertTemplates.xml.

    Note Note

    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.

    Note Note

    You might need to restart the SharePoint Timer Service.

Show:
© 2015 Microsoft