[All Adaptavist Apps]

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Property

Required

Default

Notes

Theme Panels Only

Ver

decorator

(error)

all decorators

Only hide the content when a specific decorator us being used, eg. "printable", etc.

(tick)

 

context

(error)

all contexts

Only hide the content for specific context(s), eg. "page", "global", etc.

(tick)

 

mode

(error)

all modes

Only hide the content for specific modes, eg. "view", "edit", "dashboard", etc.

(tick)

 

space

(error)

n/a

Only hide the content if a specific space (referred to by the Space Key) exists.

 

 

page

(error)

n/a

Only hide the content if a specific page (referred to by the page title) exists.

 

 

title

(error)

n/a

Only hide the content if the current page has a specific title

 

 

label

(error)

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

(error)

n/a

Metadata associated with the current location in the frormat: "myKey1:myValue1", etc.

 

3.0

user

(error)

All users

A comma separated list of usernames. Use @anonymous for anonymous users only.

 

3.0

group

(error)

All groups

A comma separated list of user groups. Use @anonymous for anonymous users only.

 

3.0

permission

(error)

Any permission

A comma separated list of permissions:

  • view - user has view permission
  • comment - user can add comments
  • createpage - user can create pages
  • createnews - user can create news
  • edit - user can edit pages or news
  • remove - user can remove (delete) pages, news or comments
  • attach - user can attach files
  • export - user can export pages or the space
  • createspace - user can create spaces
  • spaceadmin - user is a space admin
  • siteadmin - user is a site admin

 

3.0

recurse

(error)

false

Should parent pages (if applicable) be checked for title, labels and metadata?

  • false - only check the current page (default)
  • true - also check parent pages, eg. does the current page or any of it's parents have the specified label, etc.

 

3.0

useragent

(error)

n/a

A comma separated list of tokens to match against the user agent string of the requesting browser.

(error)

3.2.1

While none of the parameters are mandatory, you must specify at least one of them for this macro to work.

...

Expand
Specific modes within specific contexts
Specific modes within specific contexts

If you only want to hide something in view mode within the context of a page, use the following:

Code Block
{builder-hide:mode=view|context=page}
something to hide
{builder-hide}

When more than one parameter of the macro is specified, both parameters must match so in the example above the user must be looking at a page context in view mode.

You can specify multiple modes and contexts, for example:

Code Block
{builder-hide:mode=view,edit|context=page,blogpost}
something to hide
{builder-hide}

In the example above, the content would be hiden if the user is looking at either a "page" or a "blogpost" (news item) that must also be in either the "view" or "edit" mode.

Expand
Hide content based on UserAgent
Hide content based on UserAgent

You can use the useragent parameter to check for certain sub-strings such as browser names and operating systems in the user agent string. This could be used to hide incompatible content from devices such as mobile phones.
Useragent will accept a comma separated list of tokens to be tested for. This acts like an OR, if any of the tokens match then the enclosed code will not be rendered.

For example you could hide Flash content from iPhones like this:

Code Block

{builder-hide:useragent=iphone}
This content won't be rendered on iphone.
{builder-hide}
Expand
Hide content based on labels
Hide content based on labels

You can hide content if the current location has one or more of the specified labels:

Code Block
{builder-hide:labels=my:favourite,meetings}
don't show this on content labelled as the users' favourite or meetings
{builder-hide}

Beware! Most people assume that only pages and news articles can have labels, but this is not the case. When viewing space-level pages that aren't normal content pages or news articles, for example when viewing the space labels or even space admin, this macro uses any defined space labels.

...