Skip to end of metadata
Go to start of metadata

Generates a link that sets a flag to be read by panel-show/hide

Categories: development

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)

<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}

A link will be shown on the page with the text 'Set Flag to myflag'. Hovering over the link will show 'flag=myflag' in the url.

Clicking the link will refresh the page and a flag of 'myflag' will then be set for that session. Check the page source to see the Session flag has been set.