You need to edit in 'Wiki Markup' mode to include macros in your page.
The Include Page Macro allows you to display the contents of one Confluence page in another.
To display a page's contents, you require 'View' permission for that page. This is assigned by a space administrator from the Space Administration screens. See Space Permissions or contact a space administrator for more information.
To display part of a page rather than include the whole page, use the Excerpt Macro and the Excerpt Include Macro.
 |
If the name of the included page is changed after you have written the macro, the page name does not change automatically in the macro. You will need to change the page name manually in the macro. |
Include Page Macro
| What you need to type |
What you will get |
| {include:Sample Include Page} |
Start of sample page content
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam fermentum vestibulum est. Cras rhoncus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed quis tortor. Donec non ipsum. Mauris condimentum, odio nec porta tristique, ante neque malesuada massa, in dignissim eros velit at tellus. Donec et risus in ligula eleifend consectetuer. Donec volutpat eleifend augue. Integer gravida sodales leo. Nunc vehicula neque ac erat. Vivamus non nisl. Fusce ac magna. Suspendisse euismod libero eget mauris.
End of sample page content |
Where:
'Sample Include Page' is the title of the page whose contents you want to display.
Optional Parameter
Display contents of a page located in another space
{include:ds:Confluence Overview}
Where:
'DS' is the spacekey of the other space.
'Confluence Overview' is the name of the page whose contents you want to display.
RELATED TOPICS
Embed only part of an internal page
Embed an external page
Working with Macros
Take me back to Confluence User Guide
Comments (35)
Mar 30, 2006
Sriram Narayan says:
Are these includes cached as part of regular page caching?Are these includes cached as part of regular page caching?
May 11, 2006
Alan Meban says:
In order to provide users of my wiki space with something to read and review off...In order to provide users of my wiki space with something to read and review offline on the train (!), I created a page which used the {include} macro to create a page made up of multiple other pages, effectively:
{include:chapter 1}
{include:chapter 2}
{include:chapter 3}
...
The export page to PDF option (icon at top right of screen works well for the text - but it omits any images on the included pages. Is this a bug? or a feature?
The individual pages (chapter 1, chapter 2, etc) export to PDF with images ok on their own.
Jun 23, 2006
Ivan Benko says:
Hi Alan, I have created an issue regardingHi Alan,
I have created an issue regarding
http://jira.atlassian.com/browse/CONF-6436
Please add a watch to it for updates.
Thanks,
Ivan
Nov 13, 2006
Adrian Ellis says:
I'd like to have another optional parameter "labels=true" whereby the labels of ...I'd like to have another optional parameter "labels=true" whereby the labels of the included page will be associated with the including page. This would be very useful to manage labels used on included pages in the same way that the
In my case I have labels on various distribution notice pages. I would like the labels to be automatically attached to any page that uses the distribution notice so that I can easily check that all content has the correct distribution notice.
I've created an issue here: CONF-7309
In the meantime I can use the
Nov 15, 2006
Adrian Ellis says:
sorry forgot to escape the macrossorry forgot to escape the macros
Dec 17, 2006
Ankur Gupta says:
is there a way to include a page and all its child pages..rather than doing it o...is there a way to include a page and all its child pages..rather than doing it one by one?
Mar 13
James Mortimer says:
The include macro, metadatafrom macro, and the zonetemplateinstance macro all ve...The include macro, metadata-from macro, and the zone-template-instance macro all very simmilar, but subtly different, task. This is not explained in either of their documentation. Perhaps there should be a 'comparison' page?
CONTENT is the content being included, as named in the 'include' macro
INCLUDER is the page that contains the 'include' macro
Syntax
Jun 28, 2007
Bradley Mock says:
Similar to Alan's error above regarding the PDF export: The images are not expor...Similar to Alan's error above regarding the PDF export:
The images are not exported on the include page during an HTML export. The path is correct in the HTML page exported, but no attachments folder is created and the images are not downloaded.
Jun 28, 2007
Agnes Ro says:
Hi Bradely, What version of Confluence are you using? I'm currently working on ...Hi Bradely,
What version of Confluence are you using? I'm currently working on some fixes for both HTML and PDF exports for 2.6 which would also solve this problem.
Agnes.
Jul 11, 2007
Charlie Perry says:
Can I include the contents of a news item from another space? Can't see to get i...Can I include the contents of a news item from another space? Can't see to get it to work.
Jul 11, 2007
David Peterson says:
As far as I know, this will only include pages, not news items. I haven't actua...As far as I know, this will only include pages, not news items.
I haven't actually tested it, but theoretically you could use the report-info macro from the Reporting Plugin to import a specific news item from another space. Something like this:
{report-info:content:body|source=OTHERSPACE:/2007/07/12/My News Item|render=wiki}Jul 11, 2007
Charlie Perry says:
Thanks. I might just do a bit of cntrlC cntrlVThanks. I might just do a bit of cntrl-C cntrl-V
Aug 07, 2007
John Price says:
I sneaked around this problem by marking my whole news item with \ \ and then us...I sneaked around this problem by marking my whole news item with {excerpt}{excerpt} and then using
{excerpt-include:blogPost=/2007/08/06/Shopping Update - August 6, 2007}
Worked like a charm.
Aug 06, 2007
Bert Pluymers says:
It would be useful to include an optional parameter noerror. With the current i...It would be useful to include an optional parameter noerror.
With the current implementation, you get a red error message when the page to be included does not exist (or if the user does not have viewing rights). In some instances you would like this to fail more gracefully, by simply not showing any error message.
This could help in making a welcome page different for users with different permissions. Until now I couldn't find any way in doing this elegantly. The show-to and include-excerpt macros both seem to discard some of the layout or links, so they cannot be used in that context either.
It would be nice to be able to use
{include:page-with-links-that-should-not-appear-for-group-B|noerror=true}to include links from a page to which group B does not have viewing permissions, without showing an error message to group B.
Aug 06, 2007
Sarah Maddox says:
Hallo Bert Many thanks for your support. There is an existing JIRA issue CONF54...Hallo Bert
Many thanks for your support. There is an existing JIRA issue CONF-5436 which may suit your needs. You can vote for the issue, to increase its visibility. You can also log your own suggestions and requests on JIRA.
Cheers – Sarah
Aug 08, 2007
Bert Pluymers says:
Done. Thanks for bringing the JIRA issue to my attention. BertDone. Thanks for bringing the JIRA issue to my attention.
Bert
Aug 06, 2007
David Peterson says:
Hi Bert, I'm curious to know what problems you're having with the \ macro. The ...Hi Bert,
I'm curious to know what problems you're having with the {show-to} macro. The intent is that it basically displays the content or doesn't.
Aside from that, another possibility is to use the {report-info} macro from the Reporting Plugin:
{report-info:content:body|render=wiki|source=page-with-links-that-should-not-appear-for-group-B}Either way, I am interested in any problems with show-to...
Aug 08, 2007
Bert Pluymers says:
Hi David, the problem with showto is the following: Using only showto is not ...Hi David,
the problem with show-to is the following:
I tried using the report-info macro, but this macro produces some very strange errors when trying to include a page where you don't have permissions to. In some cases I ended up with a blanc page, only containing the global logo and the page title. No breadcrumbs, no navigation pane,... In other cases the header right above the include-report macro is being displayed about 40 times after which a java stack overflow is displayed.
Aug 08, 2007
David Peterson says:
Ok. Thanks for that. Your first point is a known issue/by design, but fair enoug...Ok. Thanks for that. Your first point is a known issue/by design, but fair enough for your situation. The second point is rather odd. What do you mean by the "higher permission group"? Can you post a fuller example of your markup code? Perhaps as a JIRA issue, so we don't clog the comments?
And with regards to the report-info macro, I'll admit I hadn't actually tried specifying a restricted page directly before...I'll have to investigate that one.
Aug 09, 2007
Bert Pluymers says:
Hi David, as you suggested I created a Jira issue https://jira.adaptavist.com/b...Hi David,
as you suggested I created a Jira issue regarding the above mentioned problems with the show-to macro in combination with the include macro.
Bert
Aug 08, 2007
James Mortimer says:
Bert, Take a look at the 'editinclude' user macro for a fairly simple way to w...Bert,
Aug 09, 2007
Bert Pluymers says:
Thanks for the tip James, I will look into it.Thanks for the tip James, I will look into it.
Sep 06, 2007
Ville Valtasaari says:
Is the sourcecode for the "include page"macro available somewhere. I'd like to l...Is the source-code for the "include page"-macro available somewhere. I'd like to look into ajaxifying it as we're having major performance issues w. our Confluence after upgrading from 2.2.9 to 2.5.7 (apparently the new permissions checking system is more cumbersome than the old).
Dec 27, 2007
Anonymous says:
I currently have 6 separate templates that collect user input. All 6 of these te...I currently have 6 separate templates that collect user input. All 6 of these templates are under a parent page. I want the information from the child pages (collected via templates) to be displayed on the parent page.
Using the include tag, this works, but I lose all formatting and it includes as blocks of text.
Any way around this?
Jan 01, 2008
Choy Li Tham says:
Hi, Please raise a support ticket at our support system: https://support.atlass...Hi,
Please raise a support ticket at our support system: https://support.atlassian.com. Hence, we can follow up this issue from there. Thanks.
Regards,
Choy Li
Jan 08, 2008
James Mortimer says:
have you tried using the zonetemplateinstance macro, from the confext:zones plug...have you tried using the zone-template-instance macro, from the Zones Plugin, without any parameters. it works like include, but renders AFTER the inclusion, rather than before.
Not sure what you mean by templates that collect user input, so they might not work with inclusions or zones.