Space overview
Asked by Daniel Seegr?ber:

Hi, I am looking for an overview of all pages within one space which contains the title, the version and the last updated date.


Answers:
author: Kristian Klima
body: Hi [@Daniel Seegr?ber](/t5/user/viewprofilepage/user-id/597878)

Confluence's Databases is your answer

You can get all the pages in your space into a database quite easily ([see this debate for details](https://community.atlassian.com/t5/Confluence-questions/Shortcut-to-add-quot-Page-Link-quot-entries-to-confluence/qaq-p/2597061#M291172) ), then it's just about configuring fields.

comments: author: Daniel Seegr?ber
body: Awesome! Thank you.

Confluence's Databases indeed was the answer. Issue solved!


author: Nikola Perisic
body: Hello [@Daniel Seegr?ber](/t5/user/viewprofilepage/user-id/597878)

For the overview of all pages, you can use the Child Pages macro in confluence which will display only the title of the pages. For displaying the contributions, you would use the Contributors macro, where you would check Show Last Contribution time.

As a result, you would get something like this:

![Screenshot 2024-02-13 at 11.42.57.png](https://community.atlassian.com/t5/image/serverpage/image-id/306065iAD8F3454020869E2/image-size/large?v=v2&px=999 "Screenshot 2024-02-13 at 11.42.57.png")

So these macros would need to go separately.

comments: author: Daniel Seegr?ber
body: Thanks, but then I'd still need the page version...


author: Roma Bubyakin
body: Hi [@Daniel Seegr?ber](/t5/user/viewprofilepage/user-id/597878)

As an alternative solution to Confluence's Databases proposed by [@Kristian Klima](/t5/user/viewprofilepage/user-id/5074962) you can take a look at **our app** [User Macro for Confluence Cloud](https://marketplace.atlassian.com/apps/1232013/user-macro-for-confluence-cloud?hosting=cloud&tab=overview)

**Pros**

* Live update of the data
* Reusable on all spaces/pages
* Customizable view and data
* Possibility to create any other macro for different purposes

**Cons**

* 3rd party paid app (free for \<10 users)
* custom markup language (HTML + Handlebars)

Your solution might look like the following.

1. Adding a macro to a page

![Space-updates-overview_macro-browser.png](https://community.atlassian.com/t5/image/serverpage/image-id/306427i26F4A28A6C2EC818/image-dimensions/280x276?v=v2 "Space-updates-overview_macro-browser.png")

2. See the result on a View page

![Space-updates-overview_render.png](https://community.atlassian.com/t5/image/serverpage/image-id/306428iCA5A73151AC1DD99/image-size/large?v=v2&px=999 "Space-updates-overview_render.png")

Here is how the template will look like for your use case.

1. Get Pages in the current space  
2. Create a table  
3. Iterate through pages and add rows with data in the required format  

```
## get pages in the current space
#set($spaceId = $space.id )
#set($sort = "-modified-date") ## order by modified date DESC
#set($status = "current") ## skip archived, deleted, and drafted
#set($limit = 250) ## increase pages limit to maximum

#set($url = "/wiki/api/v2/spaces/${spaceId}/pages?sort=${sort}&status=${status}&limit=${limit}")

#set($response = $ConfluenceManager.get($url))

## Use of Atlassian UI (AUI) sortable table
<table class="aui aui-table-sortable">
  <thead>

    <tr>
      <th>Title</th>
      <th>Version</th>
      <th>Last updated</th>
    </tr>

  </thead>
  <tbody>

  ## iterate through results of pages
  #foreach($page in $response.results)

  <tr>
    <td>${page.title}</td>
    ## "aui-badge" will put number in a grey circle
    <td><span class="aui-badge">${page.version.number}</span></td>
    ## Convert datetime to date
    ## "2024-02-13T12:12:31.528Z" -> "2024-02-13"
    #set($createdAt = $StringUtils.substringBefore($page.version.createdAt, "T"))
    <td>${createdAt}</td>
  </tr>

  #end

</tbody>
</table>
```

<br />

Regards,  
Roman from Wombats Corp


Tags: cloud

confluence-cloud