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.
This example will be setting a flag (conditional value) whenever the page viewer is a member of the confluence-users or confluence-administrators group. This will separate basic users from those with higher permissions
Repeat for the confluence-administrators group.
So you have told ThemeBuilder to set a value of ‘conf-user’ into its logic whenever the user is in the group ‘confluence-users’ and ‘conf-admin’ when a ‘confluence-administrator’
If a Confluence user or administrator browses to a page that uses this skin, and views the HTML source, they can see a CSS class has been added to the <body> tag for each group they are a member of e.g. ‘flag-conf-user’. Any flag you set will appear in the body tag in this way.
You can use this flag to selectively change the CSS for all users by the group they belong to. By ensuring that the most important group always appears last in the flaglogic macros and the relevant CSS, the logic hierarchy will always follow the right order of permissions - least permissions to all permissions.
Using Firebug in Firefox, or similar developer tools, you can find the CSS class or ID needed to target any Confluence page item. The class for the sidebar ‘Space Tools’ link is ‘acs-nav-item settings’. Combining this with the ‘flag-conf-user’ class now showing in the body tag you can build CSS that will hide the ‘Space Tools’ link for ‘confluence-users’. Then you make it visible again for ‘confluence-administrators’.
For neatness this CSS also hides or shows the <hr> that divides the navigation in this section.
Now you have a flag set for confluence users or administrators you can use this in ThemeBuilder macros to display or hide content. All ThemeBuilder macros can detect and use a flag and this means less use of the ‘show’ or ‘hide’ macros.
The Likes and Labels content is added in the ‘content’ panel by the code
To change its visibility click on the code, click ‘Edit Macro’ and add the flag we added earlier - ‘conf-admin’ - to the ‘Not Flag’ field.
This means that if the flag ‘conf-admin’ is set, ThemeBuilder will not display the Likes and Labels content. An Administrator sees