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
Community showcase
Published Dec 18, 2018 in Confluence Cloud

Happy holidays from our team to yours!

Hi Community!  2018 was filled with changes for our team, both big and small, and we've taken a lot of time to both celebrate our wins and recognize areas of improvement. One thing that we're a...

486 views 3 18
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