Any way to exclude sections from publishing in Confluence? Edited

Hi, New to Confluence here..

In regards to document templates, I'd like to create one which doesn't publish a section unless text has been entered into it.  Below, the "Optional ..." sections would only be published to the document if they contained information. Otherwise, the entire "Optional ..." section would be omitted and the published document would only contain "Title" and "Details".  Is there any way to do that?  Thanks!

------------------ sample ---------------

Title:

   My Title for My Document

Details:

  This is a document for illustrating my question.

Optional Locations:

Optional Notes:

  The 'Optional Locations' section will not be published in my document

2 answers

The Project Documentation Macros provide a Section Macro that renders if there is content in the body of the macro and does not render if the body is empty. This add-on (or app) is available for Confluence server on the Atlassian Marketplace for free.

The projectdoc Toolbox is a commercial add-on (or app) that provides some more features for the Section Macro. But I think the free add-on provides the features you are looking for.

Biased alert: I'm one of the authors of both add-ons.

Thanks, appreciate the transparency. I think the Section Macro is precisely what I'm looking for but will look into both.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published 10 hours ago in Confluence

Think you know shares vs. @mentions in Confluence? Take this collab quiz.

To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...

91 views 2 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you