Is it possible to pull multiple excerpts into one page automatically?
Asked by Nancy Greenfield:

I have a page template that includes an Excerpt macro. Users click a "Create from Template" button on a parent page, to create a new child page that includes a summary inside an Excerpt macro. On the parent page, I don't want anyone to have to edit it every time a new page is added. It appears that we currently have to edit, add a new Excerpt Include macro and specify the new page to include. Is there anyway to automate including all child page excerpts?

Thank you


Answers:
author: GlenRSmith
body: This can be accomplished by using the [Children Display macro.](https://confluence.atlassian.com/doc/children-display-macro-139501.html) The Include Excerpts property can be set to Simple or Rich content

* **None** - no excerpt will be displayed
* **Simple** - displays the first line of text contained in an Excerpt macro any of the returned pages. If there is not an Excerpt macro on the page, nothing will be shown.
* **Rich content** - displays the contents of an Excerpt macro, or if there is not an Excerpt macro on the page, the first part of the page content, including formatted text, images and some macros.

comments: author: Nancy Greenfield
body: Thank you, Glen.

At the time I was thinking of having excerpts on a page that come from pages in different spaces.

The solution you mention requires that the pages must be child pages of the page containing the Children Display macro.

It wasn't the solution that I was looking for, at the time, but this is still good to know.

Thank you.


author: Andrey Khaneev _StiltSoft_
body: Hi Nancy,

[Table Excerpt Include and Table Excerpt](https://docs.stiltsoft.com/display/TableFilter/How+to+use+Table+Excerpt+and+Table+Excerpt+Include+macros) macros should solve your problem. What you'll need to do is:

1. Add one Table Excerpt Include macro set to pull excerpts from child pages.
2. Add Table Excerpt macro to the page template instead of Excerpt macro.

So a single Table Excerpt Include will include multiple multiple excerpts. Those macros are included in [Table Filter and Charts](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?hosting=server&tab=overview) app.


author: Nic Brough -Adaptavist-
body: You will need some code to enable that. A template is a fixed set of things to place on a new page, it's not dynamic. You might be able to do it with a user macro that iterates over the child pages and tries to create a set of include-excerpts automatically.

comments: author: Nancy Greenfield
body: Thank you Nic - Understood. The "fixed template" simply gives the user's page an *Excerpt* macro area in which to write a summary. I have a parent page where I can use the *Excerpt Include* macro, but having to configure additional *Excerpt Include* macros every time a new child page is added wouldn't be an efficient use of time. I'm surprised the *Excerpt Include* macro doesn't have an advanced configuration option to grab multiple Excerpts. I'm interested if anyone else has done a roll-up of excerpts on one page. Maybe there's another macro that I'm not aware of that can do this. I'll investigate further.


Tags: confluence-server

server