Show If
Description
This macro will show its contents to the viewer if the context matches the parameters specified.
On Cloud, if you have large content consider breaking it into smaller chunks over multiple Show If macros to avoid performance issues.
Notes about migration
Some legacy Macro parameters from Confluence Server are not supported yet. More details on our FAQ page.
In Confluence Cloud, the legacy Macro parameters will be shown in a section that is accessible by showing and hiding the legacy field parameters dropdown.
If the migrated macro has no legacy parameters, the "Show legacy field parameters" dropdown will not be visible in the macro editor.
Be aware that content is only hidden in the Confluence page view, and that the content is still available when editing a page, viewing page history, email notifications, etc. To truly secure sensitive information, consider using the Security & Encryption app instead.
Parameters
Name | Required | Available In | Migratable to Cloud? | Default Value | Description |
---|---|---|---|---|---|
Start Date | Optional | Server, Data Center | No | The date and time from when the content should start being displayed, with respect to the server’s timezone. If no value is set, the system will not enforce any date and time restrictions. | |
End Date | Optional | Server, Data Center | No | The date and time from when the content should stop being displayed, with respect to the server’s timezone. | |
Match Using | Optional | Server, Data Center, Cloud | Yes | any | If set to "all", then all items listed must match. |
Users | Optional | Server, Data Center, Cloud | Yes | The list of user(s) to match. Type the username and select from the dropdown option. | |
Authentication type | Optional | Cloud | Yes | None | The user to match, using authentication type:
|
Special Username | Optional | Server, Data Center | Yes | The user to match, using special usernames:
| |
User Groups | Optional | Server, Data Center, Cloud | Yes | The list of user group(s) to match. Type the group name and select from the dropdown option. (Cloud only) The group(s) to match, separated by comma or semicolon (Server and Data Center only). e.g.: 'confluence-users' will match all logged in users. | |
Space Permissions | Optional | Server, Data Center | No | This property allows you to define whether the content inside this macro is hidden to a certain user based on his space permissions. This can be done by either of the following:
These are the permission types:
| |
Content Types | Optional | Server, Data Center | No | The (list of) page types. May be:
| |
Display Types | Optional | Server, Data Center | No | This property allows the user to show content only in a document that has been exported to PDF or Word and not on the Confluence page. The (list of) display modes:
For more detailed information on Display Types usage and behaviors, check the Display Types parameter matrix page. | |
Current Space | Optional | Server, Data Center | No | The (list of) spaces this will be displayed in. | |
Action Types | Optional | Server, Data Center | No | The action taking place:
| |
Labels | Optional | Server, Data Center | No | The list of labels to test are present or absent. For more detailed information on Label usage and behaviors, check the Label parameter matrix page. | |
HTTP Headers | Optional | Server, Data Center | No | The list of request header "name:value" pairs to check for. This can either be of the form "name:exact value" or "name::regular expression" (note the double "::" for regular expressions). For example, to check if the current browser is FireFox, set to This will confirm that the 'User-Agent' header contains 'Firefox'. What headers are available will depend on the browser being used. | |
Scope | Optional | Server, Data Center | No | (Since 1.6.0) Tests if the current location is in the specified scope. You can specify a particular page, or set the scope to the children, descendants or ancestors of another page:
| |
Trim | Optional | Server, Data Center | No | true | If set to false , the content will not be trimmed before being output (if appropriate). |
Macro Edit View
Tutorial Examples