I have the following maco that creates a table of information that includes, who edited the page, modification date, page name and version.
This macro works fine when applied to the page, it also works if you export just the page containing the macro.
However when you export the space, the table only shows the page on which the macro is applied.
Here is the code
## Macro title: Page Data
## Macro has a body: N
## Body processing: n/a
## Output: HTML
##
## Developed by: Brian Mitchell
## Date created: 06/27/2013
## @noparams
#set ($PageTitle = $content.displayTitle)
#set ($PageVersion = $content.version)
#set ($PageDate = $action.dateFormatter.formatGivenString("dd MMM yyyy", $content.lastModificationDate))
#set ($PageAuthor = $content.lastModifierName)
#set ($pageListArray = [])
#set ($currentPage = $action.page)
#macro ( process $rp )
#set ($pagelist = $rp.getSortedChildren() ) ## returns List<Page>
#foreach( $child in $pagelist )
#set($p = $pageListArray.add( $child ) )
#if( $child.hasChildren() )
#process ( $child )
#end
#end
#end
#process ( $currentPage)
<h1> Confluence Page Versions </h1>
<table class="confluenceTable">
<tbody>
<tr>
<th class="confluenceTh">Page Title</th>
<th class="confluenceTh">Page Version</th>
<th class="confluenceTh">Date</th>
<th class="confluenceTh">Changed By</th>
</tr>
<tr>
<td>$PageTitle</td>
<td><a href=http://confluence.mango.local/pages/viewpreviousversions.action?pageId=$content.getIdAsString()>$PageVersion</a></td>
<td>$PageDate</td>
<td>$PageAuthor</td>
</tr>
#foreach( $child in $pageListArray) ## child is of type Page
<tr>
<td class="confluenceTd">$child.getTitle()</td>
<td class="confluenceTd"><a href=http://confluence.mango.local/pages/viewpreviousversions.action?pageId=$child.getIdAsString()>$child.getVersion()</a> </td>
<td class="confluenceTd">$action.dateFormatter.formatGivenString("dd MMM yyyy", $child.getLastModificationDate())</td>
<td class="confluenceTd">$child.getLastModifierName()</td>
</tr>
#end
</tbody>
</table>
Does anyone know why this is the case?