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

Gabrielle Lods September 29, 2011

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

1 answer

0 votes
GilesG October 28, 2011

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
TAGS
AUG Leaders

Atlassian Community Events