ThemeBuilder for Confluence Server and DC

Set Flag Link

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

Usage

Follow the steps below to insert a Set Flag Link 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 link in the search bar and select Set Flag Link from the results.

    set flag link
  4. Fill in the desired parameters.

    insert set flag link macro

Storage Format

<ac:macro ac:name="set-flag-link">
<ac:parameter ac:name="parameter">value</ac:parameter>
<ac:rich-text-body>
<p>Set flag link text</p>
</ac:rich-text-body>
</ac:macro>

Wiki Markup

{set-flag-link:parameter=value}

Parameter

Name

Description

Type

Default

Required

name

Name

The flags name

string

tick

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

  • remove

enum

true

tick

type

Type

The type of flag to set:

  • session

  • user

enum

tick

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 link.

<ac:macro ac:name="set-flag-link">
<ac:parameter ac:name="name">myflag</ac:parameter>
<ac:parameter ac:name="state">true</ac:parameter>
<ac:parameter ac:name="type">session</ac:parameter>
<ac:rich-text-body>
<p>Set myflag to true</p>
</ac:rich-text-body>
</ac:macro>
{set-flag-link:name=myflag|state=true|type=session}
Set myflag to true
{set-flag-link}

Setting this simple flag link results in the following:

hover set myflag link

A link now shows on the page with the text Set Flag to myflag. Hovering over the link will show flag=myflag in the URL.

set myflag source code

Click the link to refresh the page. A flag of myflag will then be set for that session. Check the page source to see that the Session flag has been set.