Using embedded script on a page from "Site Pages", I want to display the Modified date at the bottom of the page (I also want to display a custom column called "Page Owner", but I have figured out how to get that generically).
I can get the info about ALL of the pages in Site Pages, my challenge is to return info just for the page that is currently displayed.
How do I sense the current page and display just its info?
Here is the code that works for all pages:
function getData() {
$().SPServices({
operation: "GetListItems",
async: true,
listName: "Site Pages",
CAMLViewFields: "<ViewFields>" +
"<FieldRef Name='LinkFilename'/>" +
"<FieldRef Name='Page_x0020_Owner'/>" +
"<FieldRef Name='Modified'/>" +
"</ViewFields>",
completefunc: function(xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
var liHtml = "<li>" + $(this).attr("ows_LinkFilename") +
' // ' + $(this).attr("ows_Modified") +
' // ' + $(this).attr("ows_Page_x0020_Owner") + "</li>";
$("#tasksUL").append(liHtml);
});
}
});
}