Used for showing/hiding content based on the context at the theme level
Note: when nesting panel-hide you do not need to number the macros as had to be done in builder-hide.
Only hide the content for specific modes, eg. "view", "edit", etc.
Only hide the content for specific context(s), eg. "page", "global", etc.
Only hide the content when a specific decorator us being used, eg. "printable", etc.
Only hide the content for specific action(s), eg. "viewpage". NB: The ".action" part of the action name should not be included.
Page has Label
Only hide the content if the the current location (page, news, etc) has the specified label(s), eg. "my:favourite", "meetings", etc.
Space has Label
Only hide the content if the the current space has the specified label(s), eg. "meetings", etc.
Space has Team Label
Only hide the content if the the current space has the specified team label(s), eg. "sales,marketing", etc.
Page has metadata
Metadata associated with the current location in the format: "myKey1:myValue1, myKey1:myValue1, etc". when checking for a key with a specific value. To check for the existance of metadata with any value supply a commas separated list of key names, eg: "mykey1, mykey2, mykey3" or mix & match "mykey1, mykey2:myvalue2"
Only hide the content if a specific page (referred to by the page title) exists. @parent can be used to hide data if the page is not at the root level, @child can be used to hide data if the page has children.
Only hide the content if the current page has a specific title
The key of a plugin which must be enabled for the content to be hidden
Only hide the content if a specific space (referred to by the Space Key) exists.
Matches against the current user (NB: modified by withuser) - A comma separated list of usernames. Use @anonymous for anonymous users only, @creator for the creator of the current space, @author for the author of the current page.
A comma separated list of user groups that the current user (NB: modified by withuser) should be a member of
Display content if the page has a restriction in place (none/view/edit/vieworedit/viewandedit - recursable)
User has permission
A comma separated list of content permissions that the user must have (NB: modified by withuser).
A comma separated list of tokens to match against the user agent string of the requesting browser.
A comma separated list of filenames, one of which must be attached to the current page for the content to be displayed.
Content is hidden if the current page was modified before the given time period from the current date. The date is hidden in this format: olderthan=1y6m1d1h (year/month/day/hour)
Content is hidden if the current page was modified after the given time period from the current date. The date is hidden in this format: newerthan=1y6m1d1h (year/month/day/hour)
A comma separated list of ip addresses to match against the request
A comma separated list of skins one of which must be the current skin.
The request must contain the key or key:value to match
The users locale matches
The named resource in SKINID::resource.ext or @current/@parent::resource.ext format exists
A list of panels, one of which must exist and be enabled
Should parent pages (if applicable) be checked for title, labels and metadata?
The space against which permission checks will be made. Default is current space.
The page against which permission checks will be made. Default is current page
A username that user/group/permission checks should be run against. This includes @anonymous, @creator, @author, @current
A comma separated list of flags to check, will only hide if at least one of the flags is present</li>
A comma separated list of flags to check, will only hide if none of the flags are present</li>
In the example above, "stuff to show" would only be shown if the content is being shown in "view" or "edit" mode and is also either a "page" or "blogpost".
You can determine the context and mode for any page by viewing the page source using your browser. A HTML comment output at the top of all pages shows the context and mode for each page.
If you view the HTML source of a ThemeBuilder web page you'll see similar to the following:
You can specify multiple contexts and modes by separating them with commas as shown in the usage example earlier.
Hide content if the user is anonymous (not logged in)
Logged in users will see the message, anonymous users will not.
The panel-hide macro is based on the Theme Builder macro builder-hide, and you can use the same parameters and options.