Skip to end of metadata
Go to start of metadata

For ThemeBuilder version 5.5.0+ / Confluence 5.9.7+ the flaglogic method has been changed. Please see the 'main' panel for the logic that controls which sidebar panel to show.

Flaglogic is conditional code that controls the display of panel or macro content.

It uses the flag macro to set or change a value that can then be used by other macros like ‘panel-show/hide’.

See Working with Flags for a detailed explanation of Flaglogic.

Example that detects Login page and shows related content:

In Flaglogic panel

The set-flag macro creates the ‘login’ flag and gives it a default value of false.

<ac:macro ac:name="set-flag">
   <ac:parameter ac:name="name">login</ac:parameter>
   <ac:parameter ac:name="state">false</ac:parameter>
 </ac:macro>

 

panel-show can use the Confluence decorator value of login to only show its contained code on that condition.

 <ac:macro ac:name="panel-show">
   <ac:parameter ac:name="decorator">login</ac:parameter>
   <ac:rich-text-body>
...

 

The set-flag macro is now used to set the login flag to true.

...
     <ac:macro ac:name="set-flag">
       <ac:parameter ac:name="name">login</ac:parameter>
       <ac:parameter ac:name="state">true</ac:parameter>
     </ac:macro>
   </ac:rich-text-body>
 </ac:macro>

 

In Main Panel

The ‘panel-import’ macro will use the parameter ‘flag = login’ to show the ‘login’ panel, which contains content limited to the login/logout pages.

 <ac:macro ac:name="panel-import">
   <ac:parameter ac:name="panel">login</ac:parameter>
   <ac:parameter ac:name="flag">login</ac:parameter>
 </ac:macro>