Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

User macro : display on body and remove label

cendre August 27, 2020

Hello

I'm trying to write a user macro to remove a label on a specific page if a checkbox is check

I have sucess to add a label if a checkbox with a boolean parameter

Now, I want 2 differents think :

- remove a label

- do this action with a checkbox available even I edit the page

 

Here the begin of the macro I write

## @param finie:title="Documentation finie"|type=boolean|required=true|desc=Documentation complète ?

#if ($!paramfinie == true)
##${content.labelUtil.addLabel('yolo', $action.labelManager, $content)}

#set($success = ${content.labelUtil.addLabel('yolo', $action.labelManager, $content)})

$body Documentation finie
$paramLabel1

#else
$body Documentation pas finie
$paramLabel1

#end

Can you help me ? 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, confluence administration, confluence admin training, confluence learning path, manage users and permissions, confluence certification, atlassian learning, cloud admin tools, streamline collaboration, confluence admin best practices

New Confluence Admin Learning Path! 🤩

Confidently manage users, permissions, and content in Confluence. This self-paced learning path helps admins streamline collaboration, improve user experience, and apply the best practices to get the most out of Confluence in any cloud environment.

Start Learning Now
AUG Leaders

Atlassian Community Events