• About Connect modules for Confluence
  • Admin Page
  • Blueprint
  • Content Byline Item
  • Content Property
  • Custom Content
  • Dialog
  • Dynamic Content Macro
  • Keyboard Shortcut
  • Page
  • Space Tools Tab
  • Static Content Macro
  • Web Item
  • Web Panel
  • Web Section
  • Webhook

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.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
  "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
Max length
100
Required
Yes
Pattern
^[a-zA-Z0-9-]+$
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:

1
2
3
4
5
6
7
8
{
    "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

Type
i18n Property
Required
Yes
Description

A human readable name.

Represents a string that can be resolved via a localization properties file. You can use the same i18n Property key and value in multiple places if you like, but identical keys must have identical values.

Example

1
2
3
{
  "value": "My text"
}

Properties

value
Type
string
Required
Yes
Description

The human-readable default value. This will be used if no translation exists.

i18n
Type
string
Description

The localization key for the human-readable value. Translations for the keys are defined at the top level of the add-on descriptor.


cacheable

Type
boolean
Defaults to
false
Description

Returns whether the URL should be cacheable. Cacheable URLs are taken directly from the add-on descriptor, and lack all additional query parameters:

  • standard iframe query parameters
  • product context parameters
  • JWT token


conditions

Type
[Single Condition,Composite Condition, ... ]
Description

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


contentPropertyKey

Type
string
Max length
100
Pattern
^[a-zA-Z0-9-]+$
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:

  • name
  • icon and
  • tooltip

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:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{
  "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. Not applicable if an absolute URL is specified. Possible values

    • 1
      addon
      
      - a URL relative to the add-on's base URL
    • 1
      page
      
      - targets a Page module by specifying the Page's module key as the URL
    • 1
      product
      
      - a URL relative to the product's base URL


    icon

    Type
    Icon
    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.

    Defines an icon to display.

    Example

    1
    2
    3
    4
    5
    6
    7
    {
      "icon": {
        "width": 16,
        "height": 16,
        "url": "/my-icon.png"
      }
    }
    

    Properties

    url
    Type
    string
    Required
    Yes
    Description

    The URL of the icon. Your icon needs to be hosted remotely at a web-accessible location. You can specify the URL as an absolute URL or relative to the add-on's base URL.

    height
    Type
    integer
    Description

    The height in pixels of the icon image.

    width
    Type
    integer
    Description

    The width in pixels of the icon image.


    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

    1
    2
    3
    4
    5
    6
    {
      "params": {
        "someOtherProperty": "someValue",
        "myCustomProperty": "myValue"
      }
    }
    

    target

    Type
    Web Item Target
    Description

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

    Defines the way a web item link is opened in the browser, such as in a modal or inline dialog.

    Inline Dialog Example

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    {
      "target": {
        "type": "inlinedialog",
        "options": {
          "onHover": true,
          "offsetX": "30px",
          "offsetY": "20px"
        }
      }
    }
    

    Dialog Example

    1
    2
    3
    4
    5
    6
    7
    8
    9
    {
      "target": {
        "type": "dialog",
        "options": {
          "height": "100px",
          "width": "200px"
        }
      }
    }
    

    Common Dialog Module Example

    1
    2
    3
    4
    5
    6
    7
    8
    {
      "target": {
        "type": "dialogmodule",
        "options": {
          "key": "dialog-module-key"
        }
      }
    }
    

    More details for this use-case can be found on the Dialog Module page.

    Properties

    options
    Type
    object
    Description

    An object containing options which vary based on the type of web item target you are implementing.

    Currently-allowed options are:

    • Inline Dialog Options when type is "inlinedialog", and
    • Dialog Options when type is "dialog"
    • Dialog Module Options when type is "dialogmodule"

    type
    Type
    string
    Description

    Defines how the web-item content should be loaded by the page. By default, the web-item is loaded in the same page. The target can be set to open the web-item url as a modal dialog or an inline dialog.


    tooltip

    Type
    i18n Property
    Description

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

    Represents a string that can be resolved via a localization properties file. You can use the same i18n Property key and value in multiple places if you like, but identical keys must have identical values.

    Example

    1
    2
    3
    {
      "value": "My text"
    }
    

    Properties

    value
    Type
    string
    Required
    Yes
    Description

    The human-readable default value. This will be used if no translation exists.

    i18n
    Type
    string
    Description

    The localization key for the human-readable value. Translations for the keys are defined at the top level of the add-on descriptor.


    url

    Type
    string
    Format
    uri-template
    Description

    Specifies the destination of the web item. The interpretation of this field depends on the value of the

    1
    context
    
    field.

    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.


    • System status
    • Privacy
    • Developer Terms
    • Trademark
    • Cookie Preferences
    • © 2019 Atlassian