show-if

{show-if}

Plugin: Visibility Plugin

This macro will show its contents to the viewer if the context matches the parameters specified.

Usage

{show-if:[parameters]}
Hidden content.
{show-if}

Parameters

Name Required Default Description
type(s)
The (list of) page types. May be:
  • page
  • news
  • comment
  • spacedescription
display(s)
The (list of) display modes. May be:
  • default
  • printable
space(s)
The (list of) spaces this will be displayed in.
action(s)
The action taking place.
  • view - The content is editable and is currently being viewed.
  • edit - The content is editable and is currently being edited.
  • template - The content is a template being previewed.
  • dashboard - The content is the dashboard.
label(s)
The list of labels to test are present or absent. Syntax details.
header
The list of request header "name:value" pairs to check for. This can either be of the form "name:exact value" or "name::regular expression" (note the double "::" for regular expressions).

For example, to check if the current browser is FireFox, set to 'header=User-Agent::.*Firefox.*' This will confirm that the 'User-Agent' header contains 'Firefox'. What headers are available will depend on the browser being used.

scope
(Since 1.6.0) Tests if the current location is in the specified scope. You can specify a particular page, or set the scope to the children, descendents or ancestors of another page:
  • > children - The direct children of the specified page. E.g. 'scope=My Page > children'
  • > descendents - All descendents of the specified page. E.g. 'scope="My Page" > descendents'
  • > ancestors - All ancestors of the specified page. E.g. 'scope=My Page > ancestors'
trim
true
If set to false, the content will not be trimmed before being output (if appropriate).
match
any
If set to 'all', then all items listed must match.

See Also

Labels

macro macro Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.