Documentation

Content Byline Item

Content Byline Item modules allow your Connect add-on to add dynamic content to the Confluence Content Byline - the part of the content under the title that includes metadata about the latest version of the content.

{
  "modules": {
    "contentBylineItems": [
      {
        "url": "/my-byline-item",
        "context": "addon",
        "target": {
          "type": "inlinedialog"
        },
        "tooltip": {
          "value": "Item Tooltip"
        },
        "icon": {
          "width": 16,
          "height": 16,
          "url": "/my-icon.png"
        },
        "name": {
          "value": "Item Text"
        },
        "key": "byline-item"
      }
    ]
  }
}

Properties

key

Type
string
Required
Yes
Description

A key to identify this module.

This key must be unique relative to the add on, with the exception of Confluence macros: Their keys need to be globally unique.

Keys must only contain alphanumeric characters and dashes.

The key is used to generate the url to your add-on's module. The url is generated as a combination of your add-on key and module key. For example, an add-on which looks like:

{
    "key": "my-addon",
    "modules": {
        "configurePage": {
            "key": "configure-me",
        }
    }
}

Will have a configuration page module with a URL of /plugins/servlet/ac/my-addon/configure-me.

name

Required
Yes
Description

A human readable name.

conditions

Description

Conditions can be added to display only when all the given conditions are true.

contentPropertyKey

Type
string
Description

An optional Content Property key that this Byline Item will be bound to.

The key must only contain alphanumeric characters and dashes.

When a key is supplied, the:

for this Byline item will be overwritten with the property's corresponding value (if present), and the rendered item will be updated as the value changes in the browser.

This requires the stored Content Property to have the following format:

{
  "name": {
    "value": "Item Text"
  },
  "icon": {
    "width": 16,
    "height": 16,
    "url": "/my-icon.png"
  },
  "tooltip": {
    "value": "Item Tooltip"
  }
}

Note that only fields present in the original bean will be respected when substituting values from a Content Property later. This means that to show a Content-Property-based tooltip, this Content Byline Item module must specify a tooltip. Likewise for a Content-Property-based icon, this module must specify an icon.

context

Type
string
Defaults to
addon
Allowed values
  • page
  • PAGE
  • addon
  • ADDON
  • product
  • PRODUCT
  • Description

    The context for the URL parameter, if the URL is specified as a relative (not absolute) URL.

    This context can be either addon, which renders the URL relative to the add-on's base URL, page which targets a page module by specifying the page's module key as the url or product, which renders the URL relative to the product's base URL.

    icon

    Type
    Description

    An optional icon to display with the link text or as the link, specified by URL to its hosted location. You can specify a particular width and height for the icon. Most link icons in Atlassian applications are 16 by 16 pixels.

    params

    Type
    object
    Description

    This object represents a map of key/value pairs, where each property name and value corresponds to the parameter name and value respectively.

    Example

    {
      "params": {
        "someOtherProperty": "someValue",
        "myCustomProperty": "myValue"
      }
    }
    

    target

    Description

    Defines the behaviour when the item is triggered. If omitted, the url behaves as a regular hyperlink.

    tooltip

    Description

    The internationalised text to be used in the link's tooltip.

    url

    Type
    string

    uri-template
    Description

    Specifies the URL targeted by the web item. The URL can be absolute or relative to either the product URL or the add-on's base URL, depending on the context attribute.

    This field is required if the target of the item is not a Dialog Module.

    Your add-on can receive additional context from the application by using variable tokens in the URL attribute.