[All Adaptavist Apps]
The builder-hide macro is used to hide content in specific contexts, modes and other filters...
{builder-hide:mode=view|context=page|label=meetings|metadata=mykey:myvalue} stuff to hide {builder-hide}
Note:
Some parameters, marked "Theme Only", can only be used within Builder theme panels, ie. you cannot use them within pages, etc.
The "Ver" column shows which version of Theme Builder the parameter became available in.
Property |
Required |
Default |
Notes |
Theme Panels Only |
Ver |
---|---|---|---|---|---|
decorator |
all decorators |
Only hide the content when a specific decorator us being used, eg. "printable", etc. |
|
||
context |
all contexts |
Only hide the content for specific context(s), eg. "page", "global", etc. |
|
||
mode |
all modes |
Only hide the content for specific modes, eg. "view", "edit", "dashboard", etc. |
|
||
space |
n/a |
Only hide the content if a specific space (referred to by the Space Key) exists. |
|
|
|
page |
n/a |
Only hide the content if a specific page (referred to by the page title) exists. |
|
|
|
title |
n/a |
Only hide the content if the current page has a specific title |
|
|
|
label |
n/a |
Only hide 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. |
|
3.0 |
|
action |
n/a |
A comma separated list of actions (eg: viewpage/login/logout) where the content should be hidden |
|
3.0 |
|
spacekey |
current space |
The space against which checks will be made |
|
3.0 |
|
pagetitle |
current page |
The page against which checks will be made |
|
3.0 |
|
pluginkey |
n/a |
The key of a plugin which must be enabled for the content to be hidden |
|
3.0 |
|
spacelabel |
n/a |
A comma separated list of labels applied to the space for which the content should be hidden |
|
3.0 |
|
metadata |
n/a |
comma separated list of metadata name:value pairs where the content should be hidden (recursable) |
|
3.0 |
|
team |
n/a |
A comma separated list of team-labels applied to the space for which the content should be hidden |
|
3.0 |
|
user |
All users |
A comma separated list of usernames. Use |
|
3.0 |
|
withuser |
@current |
Username that user/group/permission checks should be run against (inc @anonymous, @creator, @author, @current) |
|
3.2.2 |
|
permission |
Any permission |
A comma separated list of permissions:
|
|
3.0 |
|
recurse |
false |
Should parent pages (if applicable) be checked for title, labels and metadata?
|
|
3.0 |
|
restriction |
All groups |
hide content if the page has a restriction in place (none/view/edit/vieworedit/viewandedit - recursable). |
|
3.0 |
|
useragent |
n/a |
A comma separated list of tokens to match against the user agent string of the requesting browser. |
3.2.1 |
||
attachment |
n/a |
comma separated list of filenames, one of which must be attached to the current page for the content to be hidden |
3.2.2 |
While none of the parameters are mandatory, you must specify at least one of them for this macro to work.
You can specify multiple values for any parameter, for example:
{builder-hide:mode=view,edit|context=page,blogpost} stuff to hide {builder-hide}
In the example above, "stuff to hide" would only be hiden if the content is being hiden 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 hides the context and mode for each page.
You can specify multiple contexts and modes by separating them with commas as hiden in the usage example earlier. For the macro content to hide, all contexts and modes specified must match.
Not applicable for this macro.
You can use this macro, and the associated builder-show macro to customise navigation and panel content depending on what the user is looking at.
When using either the mode, context or decorator parameters, remember that they only work if used within a panel of the Builder theme. If you put them inside a normal page, etc., they won't work. Even if you use the move-to macro to move something from a page in to a panel, it still won't work - the mode, context and decorator settings will only work if the macro is actually in the panel notation in the theme cofiguration settings.
If you need to show or hide content with more complex conditions, there are extra aliases builder-hide2 -> builder-hide9 which may be used for nesting.
None at present.