This macro imports content from another source and renders it from the perspective of 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. This is because those menu items may have specific privilege requirements (depending on where they are used) in order to be rendered in the context of the current page. Use the Include macro in order to always show the correct values and links.
The security restrictions of the source page are honored. If the user is not allowed to see the source page, this macro is unable import it.
<ac:macro ac:name="import"> <ac:parameter ac:name="parameter">value</ac:parameter> </ac:macro>
The name of the page to import, or the skin resource in
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.
<ac:macro ac:name="import"> <ac:parameter ac:name="import">ds:More information</ac:parameter> </ac:macro>
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. This displays a screen with fields to enter the Space Key and Name of the page. Upon typing the page name, a dropdown of available pages shows.
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 and 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, the next is checked until all options are exhausted and a not found error is displayed.
The series of checks is as follows:
A space level Editable Text object (only editable by space admins)
A Global level Editable Text object (only editable by site admins)
A page in the current space (normal page permissions apply)
A Space level template
A Global level template
A resource on the current skin (or one of its parents) with the .xml extension (rendered as Storage Format)
A resource on the current skin (or one of its parents) with the .xhtml extension (rendered as Storage Format)
A resource on the current skin (or one of its parents) with no extension (output as raw HTML)
A resource on the current skin (or one of its parents) with the .html extension (output as raw HTML)
A resource on the current skin (or one of its parents) with the .wiki extension (rendered as wiki markup)
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 customizable by space admins or users without them needing to edit the skin itself.