Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Description

We have a standard on this site that all pages have a standard header and footer. The header is standard within the space and the footer is shared across the site. You may have similar standards in your organization. Up until now, that has been easy to do with space specific configuration of headers and footers. We use includes to accomplish this and make maintenance easier.

With the recent switch-over of Confluence Cloud to their new UI, the Confluence team has decided that space home pages will not show the configured header and footer any longer. It is likely this same design choice will come to Server at some point. The home page is shown as the Overview in the new UI.

This will show how to automatically add your standard header and footer to your home pages. We strongly recommend using page includes similar to what we have done to make this process easier and more maintainable.

Example configuration used on this site:

Image Added

Details

This uses the modifyPage action to add content before and after the existing content of a page. Obviously, you only want to do this once, so be sure to get it right the first time. Experiment on a test space first (smile).

Code Block
languagetext
titleModify Home Page
-a modifyPage --space XXX --title @home --content "{include:_Header}" --content2 "{include:info:_SupportFooter}{include:info:_StandardFooter}"

If you need to do this across a number of spaces then you can use runFromList

Code Block
languagetext
titleModify List of Home Pages
-a runFromList --list "XXX, YYY" --common "-a modifyPage --space @entry@ --title @home --content \"{include:_Header}\" --content2 \"{include:info:_SupportFooter}{include:info:_StandardFooter}\" "

Or use runFromSpaceList with optional selection criteria:

Code Block
languagetext
titleModify Many Home Pages
-a runFromSpaceList --regex "XXX.*" --common "-a modifyPage --space @space@ --title @home --content \"{include:_Header}\" --content2 \"{include:info:_SupportFooter}{include:info:_StandardFooter}\" "