Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using Excerpt macro multiple times on one page

Mike Creed August 1, 2023

I am trying to use the Excerpt macro to allow sections in one of my pages to be used by other pages i.e. creating a single source of truth.

I have successfully complete this task using Excerpt macro and pasting the text, etc in to the Excerpt. 

example code:

<ac:structured-macro ac:macro-id="ae438f9a-2e5f-45b8-a49d-c4df6fce7104" ac:name="excerpt" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter>
<ac:rich-text-body>
<p>This is some text that <br/>I would like to replicate to other Confluence pages.</p>
</ac:rich-text-body>
</ac:structured-macro>

The Excerpt Include example code:

<ac:structured-macro ac:macro-id="550fdd51-f144-4cd4-975a-0cc4034daf53" ac:name="excerpt-include" ac:schema-version="1">
<ac:parameter ac:name="name">test2</ac:parameter>
<ac:parameter ac:name="nopanel">true</ac:parameter>
<ac:parameter ac:name="">
<ac:link>
<ri:page ri:content-title="Tech Tips"/>
</ac:link>
</ac:parameter>
</ac:structured-macro>

However, I would like to have multiple of the above on the SAME page!!

example code

<ac:structured-macro ac:macro-id="ae438f9a-2e5f-45b8-a49d-c4df6fce7104" ac:name="excerpt" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter>
<ac:rich-text-body>
<p>This is some text that <br/>I would like to replicate to other Confluence pages.</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="01070f14-6488-4495-90a6-faa9b2090188" ac:name="excerpt" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter>
<ac:rich-text-body>This is some additional text that I would like to replicate <br/>to other Confluence pages.</ac:rich-text-body>
</ac:structured-macro>

Now according to the links below, this is possible by creating unique names for each Excerpt on the page:

https://support.atlassian.com/confluence-cloud/docs/insert-the-excerpt-macro/

https://support.atlassian.com/confluence-cloud/docs/insert-the-excerpt-include-macro/

Any thoughts?

1 answer

0 votes
Connor
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.
August 9, 2023

Hi @Mike Creed I'm not exactly sure what issue/problem you're trying to solve, could you clarify?

I've just tested the Excerpt and Excerpt Include macros and I was able to do the following:

  • Use the Excerpt macro multiple times on the same page.
    • I used it 3 times, naming the excerpts Excerpt1, Excerpt2, Excerpt3.
  • Use the Excerpt Include macro multiple times on the same page.
    • I used it 3 times, once for each of the named excerpts, Excerpt1, Excerpt2, Excerpt3.
  • Use the Excerpt Include macro multiple times on the same page for multiple occurrences of the same named excerpts.
    • I added it 3 more times to the same page as before, again once for each of the named excerpts, Excerpt1, Excerpt2, Excerpt3.
    • So 6 uses of Excerpt Include on the same page, twice each for Excerpt1, Excerpt2, Excerpt3.
Mike Creed August 10, 2023

I am wondering if it might be down to the version of Confluence we are running:

7.19.1

What version of Confluence did you test this feature on?

Connor
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.
August 10, 2023

Ahh this might a difference between server and cloud, I was testing on cloud. The documentation you linked is for cloud so I assumed you were also using cloud.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, likes for trees, atlassian community, social impact, tree planting campaign, community kudos, atlassian giving, environmental impact, sustainability, likes for good, atlassian social responsibility, community challenge

Make every click count—help us plant 50,000 trees! 🌳

Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!

Help us plant more trees
AUG Leaders

Atlassian Community Events