Set Flag Link

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

Usage

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

  1. Go to a page where 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.

  4. Fill in the desired parameters.

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


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

type

Type

The type of flag to set:

  • session

  • user

enum


flag

Flag

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

string


notflag

Not Flag

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

string


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:

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.

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.

On this page