Is there a way to list the newest pages?
Asked by Bob Nicholson:

Looking for a macro, or some way of displaying a list of pages in reverse order of creation (newest pages first).

It would be great if I could do the same thing by modification date.


Answers:
author: SarahA
body: Hallo Bob

The Recently Updated macro shows the most recently added and updated content:

<https://confluence.atlassian.com/display/DOC/Recently+Updated+Macro>

Alternatively, you can build an RSS feed:

<https://confluence.atlassian.com/display/DOC/Using+the+RSS+Feed+Builder>

And then use the RSS macro to show the feed on a Confluence page:

<https://confluence.atlassian.com/display/DOC/RSS+Feed+Macro>

Neither of the above solutions will separate the new pages from the updated pages.

I hope this helps!

Cheers, Sarah


author: MatthewC
body: and as a bonus extra! if you fancy using a user macro, this will create a table in the page of all the pages in the current space. You can then click on the column labels to order by the that value (ID, Name, Creator, Created, Modified, Modifier)

```
## Macro title: Created Page Report## Macro has a body: N## Body processing: No Body## Output: HTML#### Developed by: Matthew Cobby - mat@andamooka.com## @noparams#set($pages=$pageManager.getPages($space, true))&lt;p&gt;Num pages: $pages.size();&lt;/p&gt;&lt;table id="spacepagereport"&gt;&lt;thead&gt;&lt;tr class="spacepagereport_row"&gt;&lt;th&gt;&lt;a href="#" id="pageIdCol"&gt;ID&lt;/a&gt;&lt;/th&gt;&lt;th&gt;&lt;a href="#" id="pageNameCol"&gt;Page&lt;/a&gt;&lt;/th&gt;&lt;th&gt;&lt;a href="#" id="creatorCol"&gt;Creator&lt;/a&gt;&lt;/th&gt;&lt;th&gt;&lt;a href="#" id="createdCol"&gt;Created&lt;/a&gt;&lt;/th&gt;&lt;th&gt;&lt;a href="#" id="modifierCol"&gt;Modifier&lt;/a&gt;&lt;/th&gt;&lt;th&gt;&lt;a href="#" id="modifiedCol"&gt;Modified&lt;/a&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;#foreach ($page in $pages)   &lt;tr&gt;&lt;td&gt;$page.getIdAsString()&lt;/td&gt;&lt;td&gt;&lt;a href="/pages/viewpage.action?pageId=$page.getIdAsString()"&gt;$page.getDisplayTitle()&lt;/a&gt;&lt;/td&gt;&lt;td&gt;$page.getCreatorName()&lt;/td&gt;&lt;td&gt;$page.getCreationDate()&lt;/td&gt;&lt;td&gt;$page.getLastModifierName()&lt;/td&gt;&lt;td&gt;$page.getLastModificationDate()&lt;/td&gt;&lt;/tr&gt;#end&lt;/tbody&gt;&lt;/table&gt;&lt;script&gt;AJS.toInit(function(e) {########################### Sort by Page ID#########################   AJS.$("#spacepagereport #pageIdCol").click(function(e) {      var rows = AJS.$("#spacepagereport tbody tr").get();      rows.sort(function(a, b) {      var A = AJS.$(a).children('td').eq(0).text();      var B = AJS.$(b).children('td').eq(0).text();      if(A &lt; B) {return -1;}         if(A &gt; B) {return 1;}            return 0;});## required to stop velocity parsing the "$.each(rows,", create the code as a var &amp; print out to end HTML#set($varHack='AJS.$.each(rows,function(index, row) { AJS.$("#spacepagereport").children("tbody").append(row);});')   $varHack   e.preventDefault();   });########################### Sort by Page Name#########################   AJS.$("#spacepagereport #pageNameCol").click(function(e) {      var rows = AJS.$("#spacepagereport tbody tr").get();      rows.sort(function(a, b) {      var A = AJS.$(a).children('td').eq(1).text().toUpperCase();      var B = AJS.$(b).children('td').eq(1).text().toUpperCase();      if(A &lt; B) {return -1;}         if(A &gt; B) {return 1;}            return 0;});## required to stop velocity parsing the "$.each(rows,", create the code as a var &amp; print out to end HTML#set($varHack='AJS.$.each(rows,function(index, row) { AJS.$("#spacepagereport").children("tbody").append(row);});')   $varHack   e.preventDefault();   });########################### Sort Creator#########################   AJS.$("#spacepagereport #creatorCol").click(function(e) {      var rows = AJS.$("#spacepagereport tbody tr").get();      rows.sort(function(a, b) {      var A = AJS.$(a).children('td').eq(2).text().toUpperCase();      var B = AJS.$(b).children('td').eq(2).text().toUpperCase();      if(A &lt; B) {return -1;}         if(A &gt; B) {return 1;}            return 0;});## required to stop velocity parsing the "$.each(rows,", create the code as a var &amp; print out to end HTML#set($varHack='AJS.$.each(rows,function(index, row) { AJS.$("#spacepagereport").children("tbody").append(row);});')   $varHack   e.preventDefault();   });########################### Sort by Created#########################   AJS.$("#spacepagereport #createdCol").click(function(e) {      var rows = AJS.$("#spacepagereport tbody tr").get();      rows.sort(function(a, b) {      var A = AJS.$(a).children('td').eq(3).text().toUpperCase();      var B = AJS.$(b).children('td').eq(3).text().toUpperCase();      if(A &lt; B) {return -1;}         if(A &gt; B) {return 1;}            return 0;});## required to stop velocity parsing the "$.each(rows,", create the code as a var &amp; print out to end HTML#set($varHack='AJS.$.each(rows,function(index, row) { AJS.$("#spacepagereport").children("tbody").append(row);});')   $varHack   e.preventDefault();   });########################### Sort by Modifier#########################   AJS.$("#spacepagereport #modifierCol").click(function(e) {      var rows = AJS.$("#spacepagereport tbody tr").get();      rows.sort(function(a, b) {      var A = AJS.$(a).children('td').eq(4).text().toUpperCase();      var B = AJS.$(b).children('td').eq(4).text().toUpperCase();      if(A &lt; B) {return -1;}         if(A &gt; B) {return 1;}            return 0;});## required to stop velocity parsing the "$.each(rows,", create the code as a var &amp; print out to end HTML#set($varHack='AJS.$.each(rows,function(index, row) { AJS.$("#spacepagereport").children("tbody").append(row);});')   $varHack   e.preventDefault();   });########################### Sort by Modified#########################   AJS.$("#spacepagereport #modifiedCol").click(function(e) {      var rows = AJS.$("#spacepagereport tbody tr").get();      rows.sort(function(a, b) {      var A = AJS.$(a).children('td').eq(5).text().toUpperCase();      var B = AJS.$(b).children('td').eq(5).text().toUpperCase();      if(A &lt; B) {return -1;}         if(A &gt; B) {return 1;}            return 0;});## required to stop velocity parsing the "$.each(rows,", create the code as a var &amp; print out to end HTML#set($varHack='AJS.$.each(rows,function(index, row) { AJS.$("#spacepagereport").children("tbody").append(row);});')   $varHack   e.preventDefault();   }); });&lt;/script&gt;
```


author: MatthewC
body: You could use either the SQL macro and Run macro \& a SQL query to the database or the Customware Reporting plugin. I can post a couple of examples later if you think it would be of use?

<http://wiki.customware.net/repository/display/AtlassianPlugins/Reporting+Plugin>

comments: author: MatthewC
body: Right, sorry about that delay had some things to do ;-)

here's a solution using the Customware Reporting plugin, set to max 20 results, using the current space. created date descending.

```
{report-block:maxResults=20}{content-reporter:type=page|space=@self}{text-sort:content:space &gt; space:name}{date-sort:content:creation date|order=descending}{content-reporter}{report-body}{report-info:content:title|link=true} in {report-info:content:space|link=true}, last modified {report-info:content:modification date}{report-body}{report-block}
```

and the same by modification date

```
{report-block:maxResults=20}{content-reporter:type=page|space=@self}{text-sort:content:space &gt; space:name}{date-sort:content:modification date|order=descending}{content-reporter}{report-body}{report-info:content:title|link=true} in {report-info:content:space|link=true}, last modified {report-info:content:modification date}{report-body}{report-block}
```