updating existing articles with new template

Barb Yantha
Contributor
January 5, 2021

Is it possible to make a change to a group of articles? I've updated a template and would like to apply this template to existing articles. If that type of change isn't possible, can I make a bulk change to a group of articles-to get the same effect?

2 answers

1 vote
WW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 5, 2021

Ahhh, that would be heavenly to be able to do.  Wouldn't it?

Alas, there is no built-in feature that will let you update the pages when you update the template or any kind of bulk content change.

You've got 5 main options:

  1. Confluence REST API
  2. Plugin
  3. Update content manually
  4. Update code manually
  5. Export/edit/import

That's the main reason I learned to work with the Confluence REST API Cloud (Confluence REST API Server/DC).  If you're technical, then I'd recommend looking into using the REST API, especially if you're going to be doing this repeatedly.

If you're not technical, there are some plugins that can help with this.  However, your main option is probably going to be to update each page manually, unfortunately.

If you do have to update manually and the layout is complicated, you could try copy/pasting the code (if you can read HTML even a little).  You'd need to have Source Editor installed (a free plugin from Atlassian Labs).  That plugin is useful for so many things anyhow, it's worth installing.  If the layout is easy, then just update the content through the normal Edit screen.

To update the pages' code, you simply:

  • Make the changes on one of the pages, but don't save/update yet
    • I find copying things out of the template sometimes gives me problems, and using Source Editor can mess up your variables in templates (unless they've fixed that bug in a newer version that I don't yet have)
  • Then click the <> to go into Source Editor while in edit mode
  • Copy the code you need to add
  • Close Source Editor
  • Save/Update your changes
  • Then go into one of the other pages
    • Go into its Source Editor
    • And paste the code where it should go
  • Apply the changes and see if it works to your liking

I did find this other option that might work for you if you're a space admin.  I personally wouldn't do it since it involves export/import, and I don't want to have the chance of accidentally messing up a space every time I need to bulk update pages.  But maybe you're ok with that.

Those are all the options I can think of for updating pages when you update the template they came from.  I hope at least one of them is helpful!

Barb Yantha
Contributor
January 5, 2021

Excellent answer! Ok, I'll look into a couple of these options (fingers crossed!).

Thanks so very much!

JQ January 9, 2025

hi @WW I am not technical but see the need and am very willing to be technical, would u be able to suggest a path for me to learn to work with the Confluence REST API Cloud ? I could not figure a clear path myself so far

WW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2025
  1. Pick a programming language that you would like to use to send calls to the REST API, and learn how to make REST API calls in that language
    1. This is going to be the hardest part for someone who's non-technical
    2. cURL is what you'll see a lot of the samples done in, and there's tons of documentation and tutorials on it. You could also try Postman, which has more of a UI to work in.
    3. It really doesn't matter which language you use, whatever you're most comfortable in
    4. REST APIs were designed to be generic. That's why you can use any language for them.
  2. Then you need to learn how to authenticate to the Cloud REST API
    1. API tokens: these you can set for your account and remove and add at any time without affecting your password.
    2. The language that you choose to use should give you the syntax for authenticating; these will include "headers," which is where you'll pass your authentication information. If you use cURL, there will be examples of what to do in the Atlassian documentation.
    3. See Basic auth for REST APIs for Atlassian syntax details
  3. From there you should be able to use any REST API you want and that you have permissions to use
    1. This is where the Confluence Cloud REST API documentation will help you
    2. You can also search the Community to see examples of REST API calls that other people have made. Their code may not be complete, but it will give you an idea of how it works.
    3. You'll see there are HTTP methods like
      1. GET - pulls/reads data
      2. POST - creates (sometimes updates) data
      3. PUT - updates existing data
      4. DELETE - deletes data
      5. and some others, but those are the big ones
  4. Data sent or received is in a format called Json.
    1. You will have to parse the Json received in order to get values
    2. You will have to structure data that you send in Json format
    3. Depending on the language you select to work with, that language may make a parsing or structuring easier to do

If you really want to go down the road of REST APIs,  there will be a lot of things you'll need to learn. There's tons of documentation, videos, etc. out there, though, to help you figure it out. I hope this helps you get started!

JQ January 10, 2025

Wonder Woman you really are! thank you so much for making it simple yet detailed, I will use your suggestion as a map to get myself started!

Like WW likes this
WW
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 10, 2025

Aw, shucks, :D

0 votes
Monique Khairuliana[ServiceRocket]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 5, 2021

Hi @Barb Yantha , actually ServiceRocket's Scaffolding Forms & Templates provides this capability:

Live templates simplify updates

With Live Templates, pages dynamically inherit the template’s structure and layout in Confluence. Thousands of pages can be updated with just one click, making maintenance and updates faster and more accurate.

The app is available in Server, Data Center and Cloud. This app won't help much if you already have a set of pages that you would like to change, but hopefully this app could help you in the future.

Cheers,

Monique
ServiceRocket Product Team

Barb Yantha
Contributor
January 6, 2021

Thank you, Monique!

Suggest an answer

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

Atlassian Community Events