ThemeBuilder for Confluence Server and DC

Set Flag

The Set Flag Macro sets a flag to be read by panel-show/hide.

Root Skin Location

In ThemeBuilder, ROOT skin flags are set in the 'flaglogic' panel.

Usage

Follow the steps below to insert a Set Flag Macro in your page:

  1. Go to a page in which you want to add the Set Flag Macro.

  2. Click the Insert More Content dropdown menu and choose Other Macros.

  3. Type set flag in the search bar and select Set Flag from the results.

    set flag
  4. Fill in the desired parameters.

    edit set flag macro

Storage Format

<ac:macro ac:name="set-flag">
<ac:parameter ac:name="name">value</ac:parameter>
</ac:macro>

Wiki Markup

{set-flag:name=value}
Parameter Name Description Type Default Required

name

Name

The flags name

string

error

state

State

The state the flag should be set to

  • true: set the flag to true (default)

  • false: set the flag to false, effectively clearing the flag

enum

true

error

type

Type

The type of flag to set:

  • request

  • session

  • user

enum

error

flag

Flag

A list of flags, one of which must be defined for the content to be displayed

string

error

notflag

Not Flag

A list of flags which must not be defined for the content to be displayed

string

error

Example

Set a simple flag.

<ac:macro ac:name="set-flag">
<ac:parameter ac:name="name">myflag</ac:parameter>
<ac:parameter ac:name="state">true</ac:parameter>
</ac:macro>
{set-flag:name=myflag|state=true}

Setting this simple flag will result in the following:

page source code

With ThemeBuilder debug turned on, you can see the flags in use in the page source code.