Space overview

Daniel Seegräber
Contributor
February 13, 2024

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

3 answers

1 accepted

1 vote
Answer accepted
Kristian Klima
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 13, 2024

Hi @Daniel Seegräber 

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 ), then it's just about configuring fields.

 

Daniel Seegräber
Contributor
February 13, 2024

Awesome! Thank you. 

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

Like # people like this
1 vote
Nikola Perisic
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 13, 2024

Hello @Daniel Seegräber 

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

So these macros would need to go separately. 

Daniel Seegräber
Contributor
February 13, 2024

Thanks, but then I'd still need the page version...

Like Nikola Perisic likes this
0 votes
Roma Bubyakin _Wombats Corp_
Contributor
February 14, 2024

Hi @Daniel Seegräber 

As an alternative solution to Confluence's Databases proposed by @Kristian Klima you can take a look at our app User Macro for Confluence Cloud

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

2. See the result on a View page

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>


Regards,
Roman from Wombats Corp

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events