Imports content from another source and renders it from the perspective of the current page.
This macro imports the contents of another page into the current page. This macro differs from the regular confluence include macro in that the content is rendered in the context of the current page rather than the source page.
This subtle difference is particularly useful when you want to store re-usable chunks of menu items on a page - because those menu items may have specific privilege requirements depending on where they are used, they needed to be rendered in the context of the current page in order to always show the correct values and links.
The security restrictions of the source page are honoured - if the user is not allowed to see the source page, this macro won't be able to import it.
The name of the page to import, or the skin-resource in SKINID::RESOURCE format (the extension will be determined by the import macro and will define how it is rendered)
Render the imported content
Output the imported content (Switch this off when you are just importing logic)
A list of flags, one of which must be defined for the content to be displayed
A list of flags which must not be defined for the content to be displayed
Import the content of a page from another space to show in your theme skin. ds=spacekey, More Information=page name
By adding the 'import' macro to the 'content' panel you can show the content of any page at the bottom of all your pages.
On any page use the macro browser to insert the 'import' macro and you will get a popup, with fields to enter the space key and name of the page. If you start typing the page name a dropdown of pages will show.
One of the most powerful features of the import macro is that it is not restricted to importing content from pages - it is also capable of sourcing content from space & global templates, editable-text objects, and layout resources. This is achieved through a series of checks and fall-backs, if data is not found matching the 'page name' in the first location, then the next is checked until all options are exhausted and a not found error is displayed.
The series of checks is as follows:
By combining the capabilities of the skin resources and either pages in the space or editable text objects it is possible to create a skin that is customisable by space admins or users without them needing to edit the skin itself.