Currently have a page layout were I would like to be able to display the last modified date of an article. However I can't see how this can be done as there's no snippet in the snippet gallery were you can add modified or created dates. There is an article date option but this needs to be populated by the user. I just want the last modified date to show in display mode so user can see the last time the article was updated. Seems to be a simple thing to achieve but I can't see how to do this.
I think this still holds true, http://blog.brianfarnhill.com/2008/10/showing-the-date-modified-date-on-a-page-layout
<PublishingWebControls:LastModifiedIndicator runat="server" />
<SharePoint:FieldValue FieldName="Modified" runat="server" id="modified" ControlMode="display" />
We had a similar question, but we were restricted from modifying any sitewide files. The administrator would not permit changes to the master page.
var relativePageURL = _spPageContextInfo.serverRequestPath; var siteURL = _spPageContextInfo.webAbsoluteUrl; var query = siteURL + "/_api/web/getfilebyserverrelativeurl('/"+ relativePageURL +"')? $select=TimeLastModified,ModifiedBy/Title,ModifiedBy/LoginName&$expand=ModifiedBy";
Working sample is at this location: https://github.com/kpereyra/SharepointWikiFreshIndicator