This question is in reference to Atlassian Documentation: Excerpt Include Macro
The Excerpt Include macro allows you to include an explicite part of a page.
I was wondering now if there is a macro that works the other way round. A macro that excludes parts of a page and the rest of the page will be included.
That would be very helpful for large pages with only a small part to be excluded. Also this excluded part could be in between relevant parts, which is not possible with the Excerpt Include macro...
Community moderators have prevented the ability to post new answers.
You can use the add-on we develop - Smart Templates for Confluence
It allows you to include the contents from pages, templates, page excerpts. Helps you to build truly dynamic pages and reuse the contents as much as possible
You can define what can be included, as the plugin is very extendable (comes with pre-configured support to include and reuse excerpts (including multiple excerpts) and panels).
Well depends on how much you want to exclude the content, meaning, as long as you can't see it, does that work?
My suggestion would be to create a user macro that allows you to toggle a class (on inline style) to set display:none; Would take some work to come up with logic that allows display in the source but not in the destination – maybe something based on space, labels, metadata, etc,, but doable.
I would solve this the way Davin suggests as being the most straightforward.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm using the projectdoc Toolbox (Disclaimer: commercial, on-premise only, I'm one of the authors of this add-on ).
Using this add-on authors add new sections using the Section Macro, mark it with identifier and/or tags and then select and exclude content based on identifiers and tags.
For instance: If you have three sections with titles "Description", "Summary", and "References" you could use the Transclusion Macro with a selection of "!Description
" to render only the summary and references section.
image2016-8-20 14:20:58.png
But this is not helpful in your context since I suppose you do not want to rewrite your documents. I assume that would be just to cumbersome as you mentioned in your reply to Davin's answer.
What you could do with the projectdoc Toolbox is to have one large section and add additional sections that are tagged with e.g. "internal
".
Example: This is the document to transclude from:
image2016-8-20 14-4-23.png
The whole content is within a Content Marker Macro (with the id "all
") and each section that needs to be excluded is using the Section Macro with the tag "internal
".
The Transclusion Macro on the transcluding page then selects "all
" content and excludes all sections tagged with "internal
" from the page given above.
image2016-8-20 14-5-40.png
In the preview you can see that the internal section with title "Subsection B" is excluded because Tags is specified as "!internal
".
I hope I understood your use case correctly. You could install a trial version of the projectdoc Toolbox to make sure that you have no additional requirements that are not covered by this add-on. If you have questions, I'm happy to help!
Note that for some features to work the page requires to include the Document Properties Marker Macro. But the example shown above works without it. The projectdoc Toolbox is based on the concept that every page has properties and sections and the tools provided by this add-on in some cases rely on this assumption. More information can be found online in the projectdoc Toolbox Manual.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is the Multi Excerpt add-on that could do this. You would need three excerpts on the page and just include excerpt 1 and 3 on another page and leave out excerpt 2. Another option if you don't want to pay for the add-on would be to make all three sections excerpts on separate pages. Then you could combine them as you want. On one page you could include all three and another just include two.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sounds like an expensive workaround to me (in multiple ways).
If I would want to exclude 2 part, I would have to insert 3 parts around them.
Excluding 3 parts I would need to include 4 etc.
That's not really satisfying to me
I was more thinking of a macro that excludes a part and when you use the basic Include Macro only the rest will be included.
I guess that's not possible though...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.