Hide If
Description
This macro will hide its contents from the viewer if the context matches the parameters specified.
If you have significant content on Cloud, consider breaking it into smaller chunks over multiple Hide If macros to avoid performance issues.
Some legacy Macro parameters from the Confluence Server are not supported yet. More details are on our FAQ page.
In the 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.
Though helpful in preventing certain content from being seen by specific users, this macro is not a comprehensive security solution. The user may be able to view the content easily via other means, such as editing the page. Be aware that content is only hidden in the Confluence page view and is still available when editing a page, viewing page history, email notifications, etc. To secure sensitive information, use the Security & Encryption app instead.
If the macro is added to a page with default values for all parameters, by default, the content within the macro body will be displayed after the page is published. This happens regardless of the value of the Match Using parameter, either all, or, any.
Parameters
Name | Required | Migratable to Cloud? | Default Value | Description |
---|---|---|---|---|
Start Date | (X)
| NO
|
| The date and time from when the content should start being hidden, with respect to the server's timezone.
|
End Date | (X)
| NO |
| The date and time from when the content should stop being hidden.
|
Match Using | YES | YES | The default value is set to Any. | Set to "all” or “any.”
For example:
User groups added - A, B, C The "user“ should be part of all the groups A & B & C for the content to be hidden with the Match Using: All criteria. If the user is not part of C, then the content is not hidden in this scenario.
User groups added - A, B, C The "user" can be part of any group (A, B, or C) for the content to be hidden with the Match Using: Any criteria. |
Users | (X) |
|
| Select the list of users to match. |
Special Username | (X) |
|
| The user to match, using unique usernames:
|
User Groups | (X)
| 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 are separated by a comma or semicolon (Server and Data Center only). e.g., 'confluence-users' will match all logged-in users. |
Space Permissions | (X)
| NO |
| This property allows you to define whether the content" then followed by permission type, e.g., @self: view
These are the permission types:
|
Content Types | (X)
| NO
|
| The (list of) page types. May be:
|
Display Types | (X)
| NO
|
| This property allows the user to hide content only in a document 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 | (X) | NO |
| The list of space keys for the spaces will be displayed. |
Action Types | (X)
| NO
|
| The action is taking place.
|
Labels | (X)
| NO
|
| The list of labels to test is present or absent. For more detailed information on Label usage and behaviors, check the Label parameter matrix page. |
HTTP Headers | (X)
| NO
|
| The list of header "name:value" pairs to check for. This can either be of the form "name*:exact value" or "name::*regular expression". For example, to check if the current browser is Firefox, set it to This will confirm that the 'User-Agent' header contains 'Firefox'. What headers are available will depend on the browser being used. |
Scope | (X)
| 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 | (X) | NO
| false | If set to |