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:
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 .
-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
-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:
-a runFromSpaceList --regex "XXX.*" --common "-a modifyPage --space @space@ --title @home --content \"{include:_Header}\" --content2 \"{include:info:_SupportFooter}{include:info:_StandardFooter}\" "