Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

You need to install the Power Scripts for the Confluence app in your Confluence Server/DataCenter instance to implement the below.

...

Code Block
languagejava
//get the id of the parent
number parent = getPage("TST", "This is a demo parent page");
 
//get the ids of the direct children
number [] children = getChildPages(parent);
 
//loop through children 
for(number child in children) { 
    //set the labels to empty string -> which deletes all labels of the page
    %child%.labels = "";
}

Replace

  • TST with the key of Space where the parent page exists.

  • This is a demo parent page with the title of the desired parent page.

...

Note

Note: If you have utilized these labels in any macro that involves labels (for example, the Content by Label macro), deleting those labels may cause the above child pages to be excluded from the macro-generated results.

 

Example

  • Here’s an example showing the above script in action:

...

Reference

...

See Other Recipes:

...