Using pages as backgrounds
One of the most requested features for draw.io and draw.io was the concept of using one or more pages as backgrounds for other pages. You can use this to apply a background graphic to provide a consistent branding across your diagrams, or to add an information block to technical diagrams.
How to set a background page
Choose one of the pages in your multi-page diagram to be your background. Often it makes sense to define the last (right-most) page as the background. You can have more than one background page - being a background page isn't a specific property of a page, it still behaves like a standard diagram page.
First, create two pages:
In one page, draw your background.
In this example, the built-in placeholders are used within the information block.
Then, select your foreground page.
With nothing in the diagram selected click Change in the Diagram tab of the format panel.
Select the background page from the list in the Background dialog, in this example, named Background.
The first diagram page now contains the second page as a non-selectable background.
Click on this example to open it in the online draw.io editor.
Tip: Lock all of the shapes and connectors on the background page if you don't want them to be edited by mistake when someone opens that diagram page.
Use a background, page data and placeholder properties together
A background page can show values that are different on each page that uses it, for example an "owner" property defined in the page data of a particular diagram page.
When you use the predefined placeholders %page% and %pagenumber% in a background page, they show the name and number of the page you are looking at, not the background page. Your own global custom properties work the same way - they will be overriden by the matching defined properties in the current page data.
- On the background page, type placeholders into the labels of the shapes, for example
%owner%. - Edit the shape data for each of these shapes - a shape and press
Ctrl+Mon Windows orCmd+Mon macOS. Make sure the Placeholders checkbox is enabled, then click Apply. - Make sure nothing is selected on the background page, then click Edit Data in the Diagram tab of the format panel. Add the properties and their default values, for example
ownerwith the default valueITS, then click Apply. - Select a page that uses the background page. Make sure nothing is selected, then click Edit Data in the Diagram tab. Add the properties that need to be overriden on this page, for example
ownerwith the valueDavid, then click Apply.
The background of the current page will show the page property values for this page if they are defined, and fall back to the default values from the background page when not defined.
The values of placeholder properties are included when you export or print the pages, and in embedded diagrams.
Related
If you are using draw.io for Confluence you could add templates of your background pages in both Cloud and Data Center.
If you are storing your diagrams in Google Drive, you could create a background pages folder in your shared team drive that users can copy and use as a basis for their own diagrams.
Learn more about using backgrounds in diagrams.