How to add pre-defined template to a previously created pages


I created a template using confluence, then I can use my pre-defined template for any new pages that I'll create.  But I have some previously created pages without my pre-defined template being applied.   Does anyone know how to insert my pre-defined template into my previously created pages?  


Any hints/tips are greatly appreciated!


2 answers

0 votes

You can't.

A template is a starting point, a guide for writing a page.  It's not part of the page and has no use within, or even relationship with, the page you create from it.

To do this automatically, you would need to embed something in your template that stores "this page was created by" and then write a routine that can find pages tagged with that and intelligently edit them to bring them in line with your template changes.

But you'd still need to go and tag all the old pages if you did it.

Thanks Nic!

I agree with you that I need to write a routine to scan those pages and edit the them to bring them in line with my  template content.   Currently we have 100+ pages that need to be edited to be in line with my template changes. I'm newbie with Confluence.  Only way I do is to find or use the out-of-box confluence feature to get this done.  So far I haven't found any.  So I might just have to go in to each page to manually update them, which is quite tedious and time consuming.  On the other hand, if writing some code/routine can help get this done efficiently, I'm willing to try.  Would you be kind enough to shed some light toward that direction? 


Here is what I'm trying to do.  I created a header page to include the info that needs to be placed on top of each page including child and sub-child pages (total: 100+ pages currently).   The header page has the info like this:


"Documentation for XXX Version.  Documentation for XXXX and earlier versions is available too.".   

Below link shows an example of the header info I'm trying to use and create.

Now I just need to get that header info broadcasted to all child and sub-child pages (100+ pages) of the existing page.

Is there anyway to achieve this goal?


Again, really appreciate your help!


Daniel Wester Community Champion Mar 07, 2015

Are you wanting to apply that to all of the pages in the space? If so you can edit the template in the space.

There is nothing in Confluence that will do this, and no plugins I'm aware of either - that's why I started with "you can't" in the answer. Your simple banner to be included is a good approach because it gives you flexibilty in the future and you don't have to be horribly clever with your edits, just "find page, add section at the top". But, that's where you'll need to either script something or do it by hand

I've been investigating the Scaffolding Plug-in that has a so-called "Live Template" concept. I'm trying to verify if it allows for template changes to be reflected in previously created pages. They are saying "Yes".

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

133 views 3 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you