Exclude current page when using a content by label macro in Confluence Cloud

Spencer Holt February 19, 2021

How can I exclude the current page in a 'Content by Label' macro in Confluence Cloud? I'm having a hard time finding information about that.

4 answers

3 votes
p_borloz July 19, 2022

Hi,

I found a solution, that works for me. It is not perfect, because each time you edit the content by labels macro, you have to do the manipulation* again.

 

1. Choose the filter "With title"

2. Add the title of the page and put a "-" in front. The page will now be excluded. 

*ATTENTION: each time you edit the macro "Content by label" you have to reput the "-" in front of the Title. I don't know why the "-" disappears.

and of course, if you change the name of the page, you'll have to adapt it in the macro aswell....

Unbenannt.JPG

Nicole Buysse April 14, 2023

Somehow this did not work for me. 

Benj Hingston October 18, 2023

Might not be your case, but for me I had to ensure the label existed. This example is with the title so there might be a little nuance that differs from labels. The negation wouldn't properly work for labels that didn't exist. It would just create a new label with a dash infront.

3 votes
Petr Vasich July 14, 2021

Hello.

You can create an exclusion label and add it to the pages you want to exclude. For example "donotshow" and add it to the filter as "-donotshow" (with "-" before the label). In this case, the filter will exclude to all pages with the fist label that do not have the second label.

Documentation https://support.atlassian.com/confluence-cloud/docs/insert-the-content-by-label-macro/#ContentbyLabelMacro-AND-OR-andNOToperators 

2 votes
Nicole Buysse April 14, 2023

I found following solution, which is actually quite simple:

  • I entered the label I wanted to show the pages for.
  • Then I clicked on Show (options) 

    Show.jpg


  • A small options menu opens.  en TADAAA...   here you can select Exclude current page, besides a few other options  :-)
  • Press Save, or click Hide to hide the options menu again, and then press Save

Options.jpg

 

It works for me :-)

p_borloz April 16, 2023

Hi, I was baffled when I saw the second image in your post and had to try it for myself. This feature has been requested for more than 17 years now.. Quite disappointed, that this seems to not be implemented in the cloud version of Confluence.

 

May I ask which version of Confluence you are using?

Like # people like this
Nicole Buysse April 17, 2023

Hi there.  I was using confluence in the office.  We use Confluence Data Center 7.13.7

Kr

Nicole

Like p_borloz likes this
Debra Graham November 13, 2023

@Nicole Buysse - I too used this in the Server version of Confluence.  However, it is not available in the Cloud version.

Like Cortlandt _ likes this
2 votes
Katerina Kovriga _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 20, 2021

Hi @Spencer Holt ,

If you have the Table Filter and Charts for Confluence app installed for your Confluence instance, I can suggest using the following workaround:

Fri 2-1.png

  • Set the reversed filter for the Title column (click on the "=" to exclude page titles). For example, here we don't show "The Table Filter Macro (new)" page. You may exclude your current page and any pages you wish

Fri 2-2.png

  • You may also filter other columns as well to get more precise results

Fri 2-3.png

Hope this will help your case.

Spencer Holt February 22, 2021

Right now I doubt that my organization will purchase a new plugin/app, but thank you for the information.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events