[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 show the content when a specific decorator us being used, eg. "printable", etc.

(tick)

 

action

(error)

all actions

Only show the content for specific action(s), eg. "viewpage". NB: The ".action" part of the action name should not be included.

 

3.0

context

(error)

all contexts

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

(tick)

 

mode

(error)

all modes

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

(tick)

 

space

(error)

n/a

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

 

 

page

(error)

n/a

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

 

 

title

(error)

n/a

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

 

 

label

(error)

n/a

Only show the content if the the current location (page, news, etc) has the specified label(s), eg. "my:favourite", "meetings", etc.

 

 

spaceLabels

(error)

n/a

Only show the content if the the current space has the specified label(s), eg. "meetings", etc.

 

3.0

teamLabels

(error)

n/a

Only show the content if the the current space has the specified team label(s), eg. "sales,marketing", etc.

 

3.0

metadata

(error)

n/a

Metadata associated with the current location in the format: "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

Matches comma seperated tokens against the user agent string of the requesting browser.

(tick)

 

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 show something in view mode within the context of a page, use the following:

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

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-show:mode=view,edit|context=page,blogpost}
something to show
{builder-show}

In the example above, the content would be shown 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
Display content based on UserAgent
Display 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 provided by browsers that visit your site. This could be used to tailor content to specific devices such as mobile phones.
Notice in the following code that you can provide a comma separated list of token to be tested for, this acts like an OR so if any of the tokens match the enclosed code will be rendered.

Code Block

{builder-show:useragent=Firefox,Opera}
You are using FireFox or Opera!
{builder-show}

By combining with use-layout you can switch to a specific layout.
For example suppose you have created a layout for iphone.
Do on the following on your home page and subsequent page will use your layout:

Code Block

{builder-show:useragent=iphone}
{use-layout:IPHONE_LAYOUT|latch=true}
{builder-show}
Expand
Display content based on labels
Display content based on labels

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

Code Block
{builder-show:label=my:favourite,meetings}
This stuff is either in my favourites list or something to do with meetings!
{builder-show}

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 and even team labels.

...