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

This widget could not be displayed.

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
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

604 views 8 6
Join discussion

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