The {excerpt-include} macro displays the an excerpt from another locaiton in your content...
This macro allows you to insert the excerpt from another page (or news item, etc) in to your content. It's useful if you want to provide a quick summary next to a link as you can use the pre-written summary for the page that the link refers to.
Add the macro to your page as follows:
{excerpt-include:page|nopanel=true/false}
Parameters
Parameter
Required
Notes
default
The default "page" parameter must be a valid page (or news item) name within the same space as the content that is using the {excerpt-include} macro.
nopanel
By default this is set to true and causes a panel to be drawn around the excerpt. If you set it to false the panel will not be displayed.
This macro is part of the standard Confluence Distribution.
Remember that this macro can only display content excerpts that are within the same Space:
{excerpt-include:ADAPTAVIST:Home}
Which results in:
ADAPTAVIST:Home
The page ADAPTAVIST:Home does not exist.
Even though that page definately does exist, the {excerpt-include} macro cannot see it. We're not quite sure why... Maybe Atlassian will upgrade the macro at a later date to allow this sort of thing.
Hints and Tips
If you're linking to another page that has an excerpt, including the exerpt for that page alongside the link ensures visitors know what's on the other end of the link. This is a great usability feature!
You can use the clickable macro to make the excerpt itself link to the other page - if it's also wrapped in a panel, it becomes a custom button.
There seems to be an issue with excerpt-include and the show-to macro. If I set up a show-to section in a document, and then excerpt-include something from another page within that show-to, it sort of breaks. All formatting breaks down (but not necessarily all at once, which is weird).
If you use excerpt-include without the show-to macro does the formatting look ok? I know that there are certain things where normal usage of the excerpt macro causes formatting to degrade, eg. I don't think macros in the excerpt will be rendered (or otherwise work properly) with the excerpt-include macro.
Sorry for the long delay. Had been working on entirely different work but now am back on a confluence project.
If you have a construct such as:
deck
show-to some group
card
excerpt-include
card
show-to
deck
much of the simple formatting for what's in the excerpt breaks. That would include simple stuff like h1. , h2., etc. Oddly, more complex formatting such as a panel within the excerpt renders properly.
Formatting is correct if you don't use the show-to macro with a card
However, you can use show-to within the excerpt (as opposed to for the whole card or the whole deck), and then it formats correctly.
Further the same construct above, but without the excerpt-include (meaning, putting the content directly into the card intead of as an include) also works.
This may look like nit-picking, I'm sure, but if you use excerpts extensively in order to compartmentalize/simplify complex pages, this is a problem. We have lots of complex structures for which we want certain usergroups to see certain cards/tabs but not others, etc, and the pages become almost impossibly long and difficult to edit if we have to put everything on one page.
There seems to be an issue with excerpt-include and the show-to macro. If I set up a show-to section in a document, and then excerpt-include something from another page within that show-to, it sort of breaks. All formatting breaks down (but not necessarily all at once, which is weird).
Anyone else have this problem?
Charles Ellmaker
ETR Associates
If you use excerpt-include without the show-to macro does the formatting look ok? I know that there are certain things where normal usage of the excerpt macro causes formatting to degrade, eg. I don't think macros in the excerpt will be rendered (or otherwise work properly) with the excerpt-include macro.
Sorry I wasn't watching this space.
Further experimentation seems to suggest that it's an issue of multiple show-tos embedded. Same with hide-from.
I'll have to experiment and see if that's the case.
Chas
Guy -
Sorry for the long delay. Had been working on entirely different work but now am back on a confluence project.
If you have a construct such as:
deck
show-to some group
card
excerpt-include
card
show-to
deck
much of the simple formatting for what's in the excerpt breaks. That would include simple stuff like h1. , h2., etc. Oddly, more complex formatting such as a panel within the excerpt renders properly.
Formatting is correct if you don't use the show-to macro with a card
However, you can use show-to within the excerpt (as opposed to for the whole card or the whole deck), and then it formats correctly.
Further the same construct above, but without the excerpt-include (meaning, putting the content directly into the card intead of as an include) also works.
This may look like nit-picking, I'm sure, but if you use excerpts extensively in order to compartmentalize/simplify complex pages, this is a problem. We have lots of complex structures for which we want certain usergroups to see certain cards/tabs but not others, etc, and the pages become almost impossibly long and difficult to edit if we have to put everything on one page.
Any idea how this might be fixed?
Many thanks,
Chas
(ETR Associates/Gates Foundation)
The notes for the nopanel parameter are reversed.
Set nopanel=true to make the panel invisible
Is there a double negative in play in the Parameters, which state
'By default this is set to true and causes a panel to be drawn around the excerpt. If you set it to false the panel will not be displayed.'
Given that the Parameter is nopanel shouldn't this read
'By default this is set to false and causes a panel to be drawn around the excerpt. If you set it to true the panel will not be displayed.'
Or is it me?