hide content on a page

Bronwyn Meadows Smith March 7, 2016

I am using Confluence Cloud.

Is there a way to hide content on a page from viewers? For instance notes that only the page owner needs to see that are specific to part of the content and need to see while in Edit mode, but don't need viewers to see?

9 answers

1 accepted

9 votes
Answer accepted
Bob Swift OSS (Bob Swift Atlassian Apps)
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.
March 7, 2016

On Cloud, you can use the HTML comment macro from Adaptavist's Content Formatting Macros.

Bronwyn Meadows Smith March 8, 2016

Yes, this will do the trick nicely!  Thank you for pointing me in the right direction Bob Swift.

13 votes
Travis Morgan May 1, 2017

Another option that I often use is the excerpt macro and select "Hide Excerpted Content"

Dheeraj Gupta May 5, 2017

Awesome Trick Travis... Thanks

Like # people like this
Michael Ross September 10, 2018

I think your option is probably the right way to do it - not a trick.

6 votes
John Corwith May 18, 2017

I know this is an old thread, but it came up in a recent search so I thought I'd put in my $0.02. I only use server but I typically use the standard Page Properties macro and just check the Hidden box. You can put anything you want in the body of the macro and only editors will see it. You just have to be careful and that you use IDs for anything you want showing up in Page Properties Reports.

This works fine but I was searching to see if there was an alternative/more elegant solution.

Arnold Macauley June 13, 2017

Thanks John, this was helpful.

Deepankana_Roy March 27, 2019

Thanks

3 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 7, 2016

There is a trick I've used for this, but it's a bit clunky the way I do it, so I'd really be very grateful if anyone could give me a better way to do it.

If you use a template to create a page, there are some that contain "instructional text".  In edit mode, this is grey and suggests that you might want to put something in.  It is not shown in the plain view mode of the page at all.

That's exactly what you need, but my issue is that I don't know how to do it when you're not in a template.  The reason I say it's clunky is that you can open a page with instructional text on it, select a chunk, then paste it back into the page you want it on, and then expand on it.  But you can't insert it directly in edit mode.

NotTheRealStephenSifersNOPENOPENOPENOPE
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.
March 7, 2016

That is a great idea to use. I do understand the "clunky" part but it is a great work around and cost saving.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 7, 2016

It's clunky because I have to copy some existing text with the formatting and then paste it in.  I'd like to be able to select it as a macro or type of text in a normal page (you can only insert it into templates)

2 votes
Milo Test
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.
March 7, 2016

A slightly less clunky method is to use the Confluence Source Editor add-on, then add this where you want the note to be:

<ac:placeholder>This is text only visible in edit mode.</ac:placeholder>

Unfortunately, the add-on is only available for server.

Artem Pletnev November 7, 2018

Thanks. That help me.

Deepankana_Roy March 27, 2019

Thanks. 

1 vote
mcwatt78 May 25, 2018

I  have found that I can use the align macros with css class "hidden".    I image this will work with other simple macros that allow a css class to be added., but align seems like an obvious choice.

I am using Confluence 5.7

1 vote
Deleted user May 16, 2018

I have found an "Hide If" macro, where you can put "Action" = "view".

In this case, the box is hidden if you are viewing the page...

Hope it helps.

1 vote
John Corwith October 31, 2017

My customer didn't like clunky.

The following user macro allows the user to enter a note to authors (if used in a template for example) that appears in the macro box title and a checkbox to view/hide the content.

Create a User Macro with:

Macro Name: hidden_stuff

Macro Title: Hidden Stuff

Macro Body Processing: Rendered

## @param Note:desc=Example: The content below will not appear in your document.

## @param Hidden:type=boolean|default=true|desc=Uncheck to temporarily view the content in your document.

#if ($paramHidden == false)

    $body

#end

John Corwith November 6, 2017

My system admins said they wouldn't deploy the above macro because it duplicates functionality the Page Properties macro can provide.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 6, 2017

I think your admins have made a mistake.  The page properties macro does nothing like that!

John Corwith November 6, 2017

Tell me about it.

1 vote
NotTheRealStephenSifersNOPENOPENOPENOPE
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.
March 7, 2016

If you are using Server you can check out this macro: https://marketplace.atlassian.com/plugins/net.customware.confluence.plugin.visibility/server/overview

The Visibility add-on contains macros which allow you to show or hide content based on a user's name, groups, space access, etc.

 

 

If you are using cloud, that macro won't work and you can ignore my answer.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events