Skip to end of banner
Go to start of banner

Delete all labels from all direct child pages of a parent page

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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

The below SIL script will delete all labels from all the direct child pages of the selected parent page in a Confluence Server/DataCenter instance:

//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: 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:

Delete Labels.mp4

Reference

See Other Recipes:

See More Documentation:

  • No labels