Skip to end of metadata
Go to start of metadata

ThemeBuilder Macro - Set Flag

set-flag

Sets a flag to be read by panel-show/hide

Categories: development

Root Skin Location

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

Usage

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}

Result

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