When using the "Include Page" Macro, how to display only the content of the first 10 lines of the page?

When using the "Include Page" Macro, how to display only the content of the first 10 lines of the page?

1 answer

Hi Gabrielle,

As far as I'm aware, 'out-of-the-box', Confluence's 'Include' macro cannot restrict content on the page it references in any way. Hence, when this macro used on a page, all content on the referenced page will be shown.

However, you could use the 'Excerpt Include' macro as a workaround. This macro is effectively the same as the 'Include' macro, but it will only show content on the referenced page which is enclosed within an 'Excerpt' macro.

Hence, what you could do is to 'wrap' the first 10 lines of content on the pages you reference in 'Excerpt' macros, then reference these pages on your other page using the 'Excerpt Include' macro instead.

The only drawbacks with this approach are:

  • More work - you need to add 'Excerpt' macros to the pages referenced in your 'Excerpt Include' macros.
  • Unlike the 'Include' macro, the 'Excerpt Include' macro cannot reference pages in other Confluence spaces - as can be seen by this long-standing improvement request (which you can vote on if you wish).

Hope this information helps.

Cheers,

Giles.

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 yesterday 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, ...

115 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