1

I am working on a publishing site inside SharePoint 2013, and i set an alert for users to send them emails when a new page is created or modified. but the problem is that the alert email will contain the page content also. and some pages are very large so users ended downloading the page contents to their machines instead of viewing it online. currently the email looks as follow:-

enter image description here

so can anyone advice if i can made my email notification simpler , by doing the following:-

  • instead of including the item content to provide a link ?

EDIT

Ok i tried modifying the announcement list alert template as follow:-

<ImmediateNotificationExcludedFields>ID;MySubsUrl;ListUrl;MobileUrl;Title;Body;Expires;Author;Editor;Modified_x0020_By;Created_x0020_By;_UIVersionString;ContentType;TaskGroup;IsCurrent;Attachments;NumComments;</ImmediateNotificationExcludedFields>
            <DigestNotificationExcludedFields>ID;MySubsUrl;ListUrl;MobileUrl;Title;Body;Expires;Author;Editor;Modified_x0020_By;Created_x0020_By;_UIVersionString;ContentType;TaskGroup;IsCurrent;Attachments;NumComments;</DigestNotificationExcludedFields>
</Properties>

& as follow :-

 <Properties>
            <ImmediateNotificationExcludedFields>ID;Alerts_link_modify;Alerts_link_view;Alerts_mobile_view;Title;Body;Expires;Author;Editor;Modified_x0020_By;Created_x0020_By;_UIVersionString;ContentType;TaskGroup;IsCurrent;Attachments;NumComments;</ImmediateNotificationExcludedFields>
            <DigestNotificationExcludedFields>ID;Alerts_link_modify;Alerts_link_view;Alerts_mobile_view;Title;Body;Expires;Author;Editor;Modified_x0020_By;Created_x0020_By;_UIVersionString;ContentType;TaskGroup;IsCurrent;Attachments;NumComments;</DigestNotificationExcludedFields>
        </Properties>

but still i get these inside the alert message , although i have excluded the following MySubsUrl;ListUrl;MobileUrl:-

enter image description here

3

You can copy the default page used to create those alerts in your 15 hive. Then make your modifications to the edited copy to make it do what you want. Once completed, you can use STSADM to update your Alert Templates.

stsadm -o updatealerttemplates -url http://mysite -f "c:\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\XML\myEditedAlertTemplates.xml" -LCID 1033

This should replace the default with what you have modified. Some Links:

http://jimecox.wordpress.com/2012/01/29/modifying-the-appearance-and-email-body-of-alerts/

How to customize SharePoint Alert Email Template

http://www.alectang.com/blog/archive/2012/05/16/how-to-customise-sharepoint-alert-email-template.aspx

http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2012/08/21/how-to-customize-the-discussion-board-plus-email-alerts-for-sharepoint-2010.aspx

EDIT 2:

There is a table which holds all of that information for each type of list alert in the alerttemplates.xml file for the header content. Try commenting those out based off of what type of list the alert is firing from in the template.

The Table in the XML:

<table class="headertop1" cellspacing="0" cellpadding="0">
<tr><td class="headercontent">
<table class="breadcrumb" cellspacing="0" cellpadding="0" width="100%"><tr><td><a href="]]></HTML>
    <GetVar Name="SiteUrl" URLEncodeAsURL="TRUE" />
    <HTML><![CDATA[">]]></HTML><GetVar Name="SiteName"/>
    <HTML><![CDATA[</a></td><tr></table>]]></HTML>
<table class="headertop1" cellspacing="0" cellpadding="0">
<tr><td class="headercontent">
<table class="breadcrumb" cellspacing="0" cellpadding="0" width="100%"><tr><td><a href="]]></HTML>
    <GetVar Name="SiteUrl" URLEncodeAsURL="TRUE" />
    <HTML><![CDATA[">]]></HTML><GetVar Name="SiteName"/>
    <HTML><![CDATA[</a></td><tr></table>]]></HTML>
    <GetVar Name="ListName" HTMLEncode="True" />
    <Switch>
        <Expr><GetVar Name="AlertFrequency"/></Expr>
        <Case Value="1"><HTML><![CDATA[$Resources:Alerts_dailysummary;]]></HTML></Case>
        <Case Value="2"><HTML><![CDATA[$Resources:Alerts_weeklysummary;]]></HTML></Case>
    </Switch>
    <HTML><![CDATA[
</td></tr>
</table>  
<table class="content" cellspacing="0" cellpadding="0">
<tr>
<td colspan="5">
 <table class="toolbar" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>
  <table border="0" cellpadding="0" cellspacing="0">
   <tr>
    <td class="toolbarbutton">]]></HTML>
        <HTML><![CDATA[<a href="]]></HTML> <GetVar Name="MySubsUrl" URLEncodeAsURL="TRUE"/>
        <HTML><![CDATA[">$Resources:Alerts_link_modify;</a>]]></HTML>
        <HTML><![CDATA[<a href="siteSettings"></a></td>
    <td class="toolbarsep">|</td>
    <td class="toolbarbutton"><a href="]]></HTML>
        <GetVar Name="ListUrl" URLEncodeAsURL="TRUE"/>
        <HTML><![CDATA[">$Resources:Alerts_link_view; ]]></HTML>
        <GetVar Name="ListName" HTMLEncode="TRUE"/>
        <HTML><![CDATA[</a></td>]]></HTML>
        <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>
    <HTML><![CDATA[            
   </tr>
  </table>
 </td></tr></table>
  • thanks for your reply, so can i apply different templates for each library within my current site collection ?or i can define only one template for each site collection. second question can you provide some links how to modify the defualt template.. – john Gu Sep 16 '14 at 22:32
  • i opened the defualt alert template named "alerttemplates.xml" but it contains very long xml code, which will be very difficult to understand and modify !!! but i find another template inside the same folder named "alerttemplates_sms.xml" which seems to target mobile browser, and i assume it will contain less info . so can i use ur command to update the Alert template to use the sms version ? what do u think ? – john Gu Sep 17 '14 at 9:44
  • I am not sure. I have not used the mobile templates before. I would say give it a shot on a DEV machine and see what heappens. You can alwas run the script and re-apply the defaults. – lazoDev Sep 17 '14 at 13:22
  • but the following link show how to hide three links only msdn.microsoft.com/en-us/library/bb862021.aspx . is there a full list that shows all the field names and the related classes ? – john Gu Sep 17 '14 at 14:05
  • can you check my edit to the original question... – john Gu Sep 17 '14 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.