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.

...

This will show how to automatically add your standard header and footer to your home pagepages. 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Ā (smile).

...

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

...