Access Keys:
Skip to content (Access Key - 0)

hide-from macro

Overview:

The {hide-from} macro is part of the Visibility Plugin by CustomWare. It hides page content from specific users or groups...

There may be times when you want to hide content on Pages, News, Comments, the Site Welcome Message and even user profiles from particular users or groups of users and that's what the {hide-from} macro is designed to do.

Such a feature allows you to, for example, display a message asking the user to login if they are not currently logged in.

Parameters:

The {hide-from} macro hides it's contents based on various settings:

{hide-from:user=users|group=groups|space=spaces|trim=true/false|match=all/any}Any content to be
hidden{hide-from}
Parameter Required Notes
user A list of one or more users to hide the content from.
group A list of one or more user groups to hide the content from.
space If the user has the specified privileges within the spaces listed, the content will be hidden.

To add a privilege to a specific space, use "SpaceKey:Privilege". Valid privileges are:
${renderedContent}
match By default, if any of the criteria match the logged in user, the content will be hidden. However, if you set this parameter to all then every single criteria will have to match before the content can be hidden.

Notes:

This macro should only be used as a simple way to personalise content depending on the logged in user and optionally any space-specific privileges they may have.

This macro should not be used as a security mechanism. While it will hide the content in most circumstances, the content will still be indexed by the search engine and features such as Page Source will still display the content.

Do not use this macro to hide confidential or sensitive information because the content will still be visible via some views or features of the software.

Examples:

Hints and Tips

When hiding content, remember that logged out users will be not be recognised (either by user name, group or space privileges) so you should consider using the show-to macro in addition to {hide-from} as seen in our example earlier on this page.

You could create an "advanced-users" group in order to hide verbose instructions from users in that group.

Frequently Asked Questions

Q Rather than hiding content from specific users, etc., I want to show it to them - how?
A Use the show-to macro.

See Also



Ask questions, get help and report bugs & issues on our Community Site

View old comments


Adaptavist Theme Builder Powered by Atlassian Confluence