Problem

Weekly Alert Template does not show complete names of  the documents in the e-mail notifications.

 

Solution

Replace the digest tag in the AlertTemplate.xml as given below. This has been changed to check the field name and shows the title of document instead of item name which was original CAML. This change has helped me achieving the more appropriate email with complete names of document.

<Digest>
     <Header><HTML><![CDATA[<html dir = $Resources:core,PageDirection;>
  <head>
  <base href="]]></HTML><GetVar Name="SiteUrl" URLEncodeAsURL="TRUE" /><HTML><![CDATA[">
 <style>
 <!--
.headertop1 {
   width: 100%;
 }
 .headercontent {
   color: #000000;
   font-family: $Resources:core,Alert_headercontent_font;;
   font-size: $Resources:core,Alert_headercontent_fontsize;;
 }
 .headercontent em {
   font-weight:bold;
 }
 .breadcrumb td {
   padding-left: $Resources:core,Alert_breadcrumb_padding_left;;
   padding-right: $Resources:core,Alert_breadcrumb_padding_right;;
 }
 .breadcrumb a{
   font-family: $Resources:core,Alert_breadcrumb_font;;
   font-size: $Resources:core,Alert_breadcrumb_fontsize;;
 }
 .content {
   margin-top:6px;
   width: 100%;
   border-bottom:solid 1px #9ca3ad;
 }
 .toolbar {
   border: $Resources:core,Alert_toolbar_border; solid #e8eaec;
   background-color: #f8f8f9;
   padding-top:3px;
   padding-bottom:6px;
   padding-right:$Resources:core,Alert_toolbar_padding_right;;
   padding-left:$Resources:core,Alert_toolbar_padding_left;;
 }
 .toolbarbutton a, .toolbarsep {
   font-family: $Resources:core,Alert_toolbarbutton_font;;
   font-size: $Resources:core,Alert_toolbarbutton_fontsize;;
   padding-left: $Resources:core,Alert_toolbarbutton_padding_left;;
   padding-right: $Resources:core,Alert_toolbarbutton_padding_right;;
 }
 .toolbarbutton a{
   text-decoration: none;
 }
 .toolbarsep {
   color:#c7cbd1;
 }
 .spacer { 
   height: 10px;
   font-size: $Resources:core,Alert_spacer_fontsize;;
   line-height: 1px;
 }
 .formline,  .noheight {
   height: 1px;
   font-size: $Resources:core,Alert_formline_fontsize;;
   line-height: 1px;
 }
 .formlabel, .formbody, .digestlabel, .altdigestlabel, .deletedlabel, .altdeletedlabel  {
   font-family: $Resources:core,Alert_formbody_font;;
   font-size:$Resources:core,Alert_formbody_fontsize;;
   padding: $Resources:core,Alert_formbody_padding_top; $Resources:core,Alert_formbody_padding_right; $Resources:core,Alert_formbody_padding_top; $Resources:core,Alert_formbody_padding_right;;
   vertical-align: top;
 }
 .formlabel, .digestlabel, .altdigestlabel, .deletedlabel, .altdeletedlabel  {
   color: #616a76;
   font-weight: bold;
 }
 .rulerow  {
   border-bottom:solid 1px #9ca3ad;
   height:0px;
   font-size:1px;
   line-height:0px;
 }
 .digestlabel a, .altdigestlabel a {
 }
 .digestlabel a:hover, .altdigestlabel a:hover {
 }
 .formbody {
   color: #000000;
 }
 .edited{
   text-decoration:line-through;
   color:#9ca3ad;
 }
 .descriptiontext {
   color: #9ca3ad;
   font-family: $Resources:core,Alert_descriptiontext_font;;
   font-size: $Resources:core,Alert_descriptiontext_fontsize;;
   padding-top:5px;
   padding-bottom:7px;
 }
 .formline {
   border-bottom: 1px solid #D7DEAC;
 }
 .editedicon, .newicon, .deletedicon {
   color:#000000;
   font-family: Small Fonts,  Tahoma, Verdana, Sans Serif;
   font-size: 7pt;
   padding-top:0px;
   padding-right:$Resources:core,Alert_icon_padding_right;;
   padding-bottom:1px;
   padding-leftt:$Resources:core,Alert_icon_padding_left;;
   position: relative;
   top:2px;
   margin-right:$Resources:core,Alert_icon_margin_right;;
   margin-left:$Resources:core,Alert_icon_margin_left;;
   font-weight:normal;
 }
 .editedicon {
   background-color:#ffffcc;
 }
 .newicon {
   background-color:#b1faa2;
 }
 .deletedIcon {
   background-color:#ffcccc;
  }
 .messagespace {
   color: #5D6437;
   font-family: tahoma;
   font-size: 8pt;
   padding-top:5px;
   padding-bottom:7px;
 }
 .editedexample {
   background: #FFFFBF;
   padding:1px;
 }
 .vh, .vb, .altvb, .deleted, .altdeleted{
   font-weight: normal;
   text-align: $Resources:core,Alert_itemdeleted_text_align;;
   text-decoration: none;
   vertical-align: top;
   font-size: $Resources:core,Alert_itemdeleted_fontsize;; 
   font-family: $Resources:core,Alert_itemdeleted_font;;
   padding-left:  $Resources:core,Alert_itemdeleted_padding_left;;
   padding-right: $Resources:core,Alert_itemdeleted_padding_right;;
 }
 .vb, .altvb, .deleted, .altdeleted, .digestlabel, .altdigestlabel, .formlabel, .formbody {
   border-bottom:solid 1px #e8eaec;
   padding-top:2px;
   padding-bottom:5px;font-family: $Resources:core,span>
 }
 .vb div.nobr, .altvb div.nobr {
   white-space:nowrap;
 }
 .vh {
   color:#76808e;
   font-weight:bold;
   padding-top:7px;
   padding-bottom:6px;
   white-space:nowrap;
 }
 .vb, .altvb {
   color:#616a76;
 }
 .altvb, .altdigestlabel, .altdeleted, .altdeletedlabel, .formlabel, .formbody {
   background: #f8f8f9;
 }
 .digesttext {
   color: #000000;
 }
 .deleted, .deletedlabel, .altdeleted, .altdeletedlabel {
   text-decoration: line-through;
   color:#9ca3ad;
 }
 .deleted a, .altdeleted a {
   color:#9ca3ad;
   text-decoration:line-through;
 }
 -->
 </style>
  </head>
  <body>
   <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>
             
         <HTML><![CDATA[</a></td><tr></table>]]></HTML>
         <GetVar Name="ListName"<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>
     </td>
    </tr>
    <tr>
     <td class="vh" colspan="2">$Resources:Alerts_event_title;</td>
     <td class="vh">$Resources:Alerts_event_modified;</td>
     <td class="vh">$Resources:Alerts_event_modifiedby;</td>
     <td class="vh"> </td>
    </tr>
     <tr>
       <td colspan="5" class="rulerow"> </td>
     </tr>
    ]]></HTML>
     </Header>
     <HeaderFieldsHeader>
         <HTML><![CDATA[]]></HTML>
     </HeaderFieldsHeader>
     <HeaderFields>
         <HTML><![CDATA[]]></HTML>
     </HeaderFields>
     <HeaderFieldsFooter>
         <HTML><![CDATA[]]></HTML>
     </HeaderFieldsFooter>
     <RowHeader>
         <Switch>
             <Expr><GetVar Name="AltRow"/></Expr>
             <Case Value="alt"><SetVar Name="AltRow" Scope = "Request"></SetVar></Case>
             <Default><SetVar Name="AltRow" Scope = "Request">alt</SetVar></Default>
         </Switch>
       
         <Switch>
             <Expr><GetVar Name="EventType"/></Expr>
             <Case Value="1">
                 <SetVar Name="LabelClass" Scope = "Request">digestlabel</SetVar>
                 <SetVar Name="TdClass" Scope = "Request">vb</SetVar>
             </Case>
             <Case Value="4">
                 <SetVar Name="LabelClass" Scope = "Request">deletedlabel</SetVar>
                 <SetVar Name="TdClass" Scope = "Request">deleted</SetVar>
             </Case>
             <Default>
                 <SetVar Name="LabelClass" Scope = "Request">digestlabel</SetVar>
                 <SetVar Name="TdClass" Scope = "Request">vb</SetVar>
             </Default>
         </Switch>
         <SetVar Name="LabelClass" Scope = "Request"><GetVar Name="AltRow"/><GetVar Name="LabelClass"/></SetVar>
         <SetVar Name="TdClass" Scope = "Request"><GetVar Name="AltRow"/><GetVar Name="TdClass"/></SetVar>
         <SetVar Name="ItemNamePart" Scope="Request">
         <IfEqual>
             <Expr1><GetVar Name="EventType"/></Expr1>
             <Expr2><HTML>4</HTML></Expr2>
             <Then>-</Then>
             <Else>
                 <HTML><![CDATA[<A href="]]></HTML>
                 <GetVar Name="ItemUrl" URLEncodeAsURL="TRUE"/>
                 <HTML><![CDATA[">review</A>]]></HTML>
             </Else>
         </IfEqual>
         </SetVar>
      
     </RowHeader>
     <RowFields>
 
       
        
        
        
       <Switch>
         <Expr>
           <GetVar Name="DisplayName#{Field}"/>
         </Expr>
         <Case Value="Title">
 
           
            
            
           <HTML>
             <![CDATA[
     <tr><td class="]]>
           </HTML>
           <GetVar Name="LabelClass"/>
           <HTML><![CDATA[" colspan="2" >]]></HTML>
           <IfEqual>
             <Expr1>
               <GetVar Name="OldValue#{Field}"/>
             </Expr1>
             <Expr2>
               <GetVar Name="NewValue#{Field}"/>
             </Expr2>
             <Then>
               <GetVar Name="OldValue#{Field}" />
             </Then>
             <Else>
               <GetVar Name="NewValue#{Field}" />
             </Else>
           </IfEqual>
           <HTML><![CDATA[<br>]]></HTML>
           <GetVar Name="ItemNamePart" />
           <HTML>
             <![CDATA[</td>
     <td "ItemNamePart" />
           <HTML>
             <![CDATA[</td>class="]]>
           </HTML>
           <GetVar Name="TdClass"/>
           <HTML><![CDATA[">]]></HTML>
           <GetVar Name="TimeLastModified" HTMLEncode="TRUE" />
           <HTML>
             <![CDATA[</td>
     <td class="]]>
           </HTML>
           <GetVar Name="TdClass"/>
           <HTML><![CDATA[">]]></HTML>
           <GetVar Name="ModifiedBy" HTMLEncode="TRUE" />
           <HTML>
             <![CDATA[ </td>
     <td nowrap class="]]>
           </HTML>
           <GetVar Name="TdClass"/>
           <HTML><![CDATA[">]]></HTML>
           <Switch>
             <Expr>
               <GetVar Name="EventType"/>
             </Expr>
             <Case Value="1">
               <HTML><![CDATA[<span class="newicon">$Resources:Alerts_event_new;</span>]]></HTML>
             </Case>
             <Case Value="4">
               <HTML><![CDATA[<span class="deletedicon">$Resources:Alerts_event_deleted;</span>]]></HTML>
       &n>"newicon">$Resources:Alerts_event_new;</span>]]></HTML>
             </Case>
             <Case Value="4">
  &bsp;     </Case>
             <Default>
               <HTML><![CDATA[<span class="editedicon">$Resources:Alerts_event_edited;</span>]]></HTML>
             </Default>
           </Switch>
           <HTML><![CDATA[</td></tr>]]></HTML>
            
           
         </Case>
         <Default>
 
        </Default>
       </Switch>
 
      <Switch>
             <Expr><GetVar Name="EventType"/></Expr>
             <Case Value="2">
                 <IfEqual>
                     <Expr1><GetVar Name="OldValue#{Field}"/></Expr1>
                     <Expr2><GetVar Name="NewValue#{Field}"/></Expr2>
                     <Then>
                     </Then>
                     <Else>
                         <HTML><![CDATA[
    <tr>
     <td class="]]></HTML><GetVar Name="LabelClass"/><HTML><![CDATA["> <div class="nobr">]]></HTML>
                         <GetVar Name="DisplayName#{Field}" HTMLEncode="TRUE" />
                         <HTML><![CDATA[</div></td>
     <td class="]]></HTML><GetVar Name="TdClass"/><HTML><![CDATA["><span class="digesttext">]]></HTML>
     <HTML><![CDATA[<span class="edited"> ]]></HTML>
                         <Limit Len="255" AutoHyperLinkNoEncoding="TRUE" MoreText="..."><GetVar Name="OldValue#{Field}" /></Limit>
                         <HTML><![CDATA[</span> ]]></HTML>
                         <GetVar Name="NewValue#{Field}"/>
                         <HTML><![CDATA[ </span></td>
     <td class="]]></HTML><GetVar Name="TdClass"/><HTML><![CDATA["> </td>
     <td class="]]></HTML><GetVar Name="TdClass"/><HTML><![CDATA["> </td>
     <td class="]]></HTML><GetVar Name="TdClass"/><HTML><![CDATA["> </td>
    </tr>]]></HTML>
                     </Else>
                 </IfEqual>
             </Case>
             <Case Value="4">
                 <HTML><![CDATA[
    <tr>
     <td class="]]></HTML><GetVar Name="TdClass"/><HTML><![CDATA["> <div class="nobr">]]></HTML>
                 <GetVar Name="DisplayName#{Field}" HTMLEncode="TRUE" />
                 
  e><HTML><![CDATA[</div></td>
     <td class="]]></HTML><GetVar Name="TdClass"/><HTML><![CDATA[">]]></HTML>
                 <GetVar Name="NewValue#{Field}" />
                 <HTML><![CDATA[</td>
     <td class="]]></HTML><GetVar Name="AltRow"/><HTML><![CDATA[vb"> </td>
     <td class="]]></HTML><GetVar Name="AltRow"/><HTML><![CDATA[vb"> </td>
     <td class="]]></HTML><GetVar Name="AltRow"/><HTML><![CDATA[vb"> </td>
    </tr>]]></HTML>            
             </Case>
             <Default>
                 <HTML><![CDATA[
    <tr>
     <td class="]]></HTML><GetVar Name="TdClass"/><HTML><![CDATA["> <div class="nobr">]]></HTML>
                 <GetVar Name="DisplayName#{Field}" HTMLEncode="TRUE" />
                 <HTML><![CDATA[</div></td>
     <td class="]]></HTML><GetVar Name="TdClass"/><HTML><![CDATA["><span class="digesttext">]]></HTML>
                 <GetVar Name="NewValue#{Field}" />
                 <HTML><![CDATA[</span></td>
     <td class="]]></HTML><GetVar Name="TdClass"/><HTML><![CDATA["> </td>
     <td >]]></HTML>
                 <GetVar Name="NewValue#{Field}" />
                 <HTML><![CDATA[</span></td>
     <td cle="font-weight:bold;">class="]]></HTML><GetVar Name="TdClass"/><HTML><![CDATA["> </td>
     <td class="]]></HTML><GetVar Name="TdClass"/><HTML><![CDATA["> </td>
    </tr>]]></HTML>
             </Default>    
         </Switch>
     </RowFields>
     <RowFooter>
         <HTML><![CDATA[]]></HTML>
     </RowFooter>
     <Footer><HTML><![CDATA[
   </table>
   ver2.0
  </body>
 </html>]]></HTML>
     </Footer>
 </Digest>

In case you face any difficulty implementing it, you can find out more at http://www.grokinnovations.co.uk/