[All Adaptavist Apps]
...
Property | Required | Default | Notes | Theme Panels Only |
---|---|---|---|---|
decorator | all decorators | Only show the content when a specific decorator us being used, eg. "printable", etc. | ||
context | all contexts | Only show the content for specific context(s), eg. "page", "global", etc. | ||
mode | all modes | Only show the content for specific modes, eg. "view", "edit", etc. | ||
space | n/a | Only show the content if a specific space (referred to by the Space Key) exists. |
| |
page | n/a | Only show the content if a specific page (referred to by the page title) exists. |
| |
title | n/a | Only show the content if the current page has a specific title |
| |
label | n/a | Only show the content if the the current location (page, news, etc) has the specified label(s), eg. "my:favourite", "meetings", etc. |
| |
metadata | n/a | Metadata associated with the current location in the frormat: "myKey1:myValue1", etc. |
|
...
You can display content only if a specific page exists:
Code Block {builder-show:page=My Page} {include:My Page} {builder-show}In the example shown above, we only include the page if it exists. This hides the nasty error message that the include macro generates if that page does not exist. While it might seem a little strange to only show things if a specific page exists (especially considering you know the title of that page), it's extremely useful in scenarios where you are using templates and only want to show content or links if a specific page exists within the current space.
You can show content only if the current page has a parent page using the following notation:
Code Block {builder-show:page=@parent} This page has a parent page! {builder-show}
This is useful because you often want to include additional navigation on pages that have a parent page, for example you might want to include the scrollbar macro to show a linear navigation bar.
Pages which don't have a parent are:
- The space homepage
- Orphan pages (pages within a space that don't have a parent)
...