Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Is Profile given?

(Y - Yes, N - No)

Is Location given?

(Y - Yes, N - No)

Macro behavior
YNAccesses the URL specified in the profile through the pre-configured information.
NYAccesses the URL specified and renders the HTML or XML content as required.
YYAppends the URL mentioned in the Location of HTML data or Location of XML data parameter to the URL configured in the profile. Thus, the macro creates an absolute path to the required file. If this path is not valid, a network error message is displayed. To resolve this issue, contact your Confluence administrator for more information.

How it all works

Profile configuration

For this example, let’s assume the profile has the following values specified:

Note
  • Here, the profile is linked to GitLab and the base URL
shown is the base URL of the application that the macro fills automatically. 
  • of the application is taken automatically in the URL field. This URL is editable and can be changed according to your requirement.
  • In the given screenshot, an Access token is provided whereas the User and Password parameters are left empty. This is because the access token works almost like a direct link to the specified URL and thus, do not require user credentials. See the profile configuration documentation for more information about access tokens.

See the Additional links section for  section for more information about GitHub and GitLab profile creation. 

Macro editor settings

  1. Create or edit a page, add the HTML macro (for this example), and, edit it to open the macro editor.

  2. Enter a relative path (partial URL) to an attachment in Location to HTML data.

    Image RemovedImage Added

    Note

    As mentioned, the macro appends the relative path in the Location of HTML data with the base URL given in the profile. If this path is valid, the file(s) are read and the HTML content is displayed, else, a network error is displayed.


  3. Save the macro and publish the page to see the content.

Info
titlePoints to remember:
  • Profiles are a means to access and retrieve contents from external applications such as GitHub, GitLab, and so on.
  • A profile already contains the base URL and the required credentials to access the relevant application.
  • If you specify a profile in the macro editor, enter a relative path in the Location fields to access the required file(s).
  • You must specify a profile or a URL in the macro editor.
  • If you specify an absolute URL in the Location fields, the macro accesses the content in the specified path.
  • Take a look at the existing documentation such as the user guide and the administrator guide to know more about the macro itself and its usage.

...

...

...

...