Content Formatting Macros for Confluence Cloud

Button Hyperlink

Button Hyperlink Macro

The Button Hyperlink macro allows you to create stylized buttons which provide hyperlinks to other pages or websites. These can be added individually anywhere on a page or grouped as horizontal row of button links using the Button Group macro.

Although hyperlinks can be created through the standard Confluence interface, the button hyperlinks provide stronger visual integration with the application as a whole, and can be used to create pages which feel like part of Confluence itself.

Instructions

  1. Navigate to the page and you want to edit.

  2. Click the Edit icon.

  3. Click Insert > View More in the Confluence editor.

  4. Select the Button Hyperlink macro in the Select Macro screen.

    button-hyperlink-new

  5. Customize the button using the following parameters:

    Parameter Description Default Required

    Title

    The text that is displayed on the button.

    none

    check

    Destination

    The page (URL or file) that the user is directed to when they click the button.

    The field auto-completes for pages within the Confluence site, but can also take a full URL or file link such as `file:///c:/read_me.txt`.

    NOTE: For security reasons, some browsers may block URL paths that point to files on a local file system or local networked folders. This can be overridden in your browser’s security settings, but should only be done as part of a comprehensive security strategy. In most cases, it is best to host such files on dedicated web servers that use other protocols such as FTP. More information can be found in Atlassian’s documentation.

    none

    check

    Button Type

    Select the type of button to be displayed:

    - Standard
    - Primary
    - Subtle

    The effect on these buttons will differ depending on whether they are on their own, or a part of a Button Group.

    standard

    check

    Icon

    Select an icon option:
    - None: no icon is displayed on the button.
    - Preset: select from a list of Content Formatting icons.

    none

    check

    Open Hyperlink in a New Tab

    Option to display the destination URL in a separate tab

    off

    error

  6. Click Preview to see how the button will appear in your page, and make any desired changes.

  7. Click Insert. A macro placeholder is displayed on the page.

    button-hyperlink-placeholder

  8. Click Publish to view the rendered button on the page.

  9. Click a button to test the link destination and behaviour, e.g. if it opens in a new tab.

Edit the Macro

To make changes to the macro parameters, click the macro placeholder then click the Edit icon. Make the required changes, then click Save.

Button Styles

  • Standard: standard

  • Primary: primary

  • Subtle: subtle