Adding Last Modified Field to Each Publishing Page in SharePoint 2013

Let's you have a requirement to track the page modification information in a SharePoint site, there are many ways to do it. I would suggest the simpler and easier way.
 
Steps
 
1. Edit the Master page in SharePoint designer.
 
2. Add the below code
 
     <%@ Register TagPrefix='SharePointWebControls'
        Namespace='Microsoft.SharePoint.WebControls'
        Assembly='Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' %>

 
     <SharePointWebControls:EncodedLiteral runat='server'
      Text='<%$Resources:cms,pagesettings_modifieddate_label%>'
    EncodeMethod='HtmlEncode'/>:
   <SharePointWebControls:DateTimeField runat="server"
    FieldName="Modified"
    ControlMode="Display"/>
 
3. Here mode should be Display since the control should be visible only on display mode.
 
 
Hope it helps
 
Happy Share Pointing :-)
 
Ebook Download
View all
Learn
View all