Rate this page:
The confluence:customContent
module registers a new custom content type in Confluence that behaves like
built-in content types, such as page
, blog post
or comment
.
After registering a new type, the corresponding custom content can be created by one user then listed, indexed
and displayed in quick and advanced search results.
Custom content must respect the content type hierarchy by providing container and child types.
For example, custom content can be created under a page container and have a comment child,
or be under a space container and have a page child. Custom content can even be a parent or child to another piece of custom content,
although in this case, both custom content types must be registered in the same app.
See the supportedContainerTypes
and supportedChildTypes
parameters in the manifest description.
To retrieve, create, update, and delete custom content, use the corresponding REST API. As an input parameter for these requests, the content type key should be structured as follows:
forge:[APP_ID]:[ENVIRONMENT_ID]:[MODULE_KEY]
.
Where:
forge
: The prefix for content type created with Forge.APP_ID
: The identifier for your Forge app. To get the app ID, use the useProductContext hook.
The app ID is a part of the localId
attribute.ENVIRONMENT_ID
: The environment identifier where the app was deployed.
For more details, see Environments and versions. To get the environment ID,
use the useProductContext hook.MODULE_KEY
: Unique confluence:customContent
module key.For example:
forge:b44c55b2-251f-45e3-8ea4-b56762f82e8a:f7522737-117c-46e7-a7ca-03a73c99afcf:customer
UI kit SpaceCustomContentListView and PageCustomContentListView components can be used in other Forge modules (like confluence:spacePage or confluence:contentAction) to display a list of custom content created in a space or page. For more complex user interfaces, you can create a custom list component. Regardless, all custom content created within a page is available under Page -> Action Menu -> Attachments -> Custom Contents. On this page, each type of custom content is grouped within a separate tab.
The confluence:customContent
module defines the app that is rendered to display custom content.
This app is rendered under /display/:spaceKey/customcontent/:customContentId
url inside the main content area of the Confluence.
On apps that use Custom UI, module content is displayed inside a special Forge iframe which has the sandbox attribute configured. This means that HTML links (for example, <a href="https://domain.tld/path">...</a>
) in this iframe won't be clickable. To make them clickable, use the router.navigate API from the @forge/bridge
package.
Property | Type | Required | Description |
---|---|---|---|
key |
| Yes | A key for the module, which other modules can refer to. Must be unique within the manifest. Regex: Known limitation and issues:
|
function | string | The content action module requires either a function for usage with the UI kit, or a resource when building with custom UI. | A reference to the function module that defines the app that renders custom content. This function must return the Custom Content component. |
resource | string | A reference to the static resources entry that your custom content app wants to display. See resources for more details. | |
render | 'native' | Yes for UI Kit 2 | Indicates if the module is a UI Kit 2 module. |
resolver | { function: string } or{ endpoint: string } | Set the Set the Can only be set if the module is using the | |
title | string | Yes | The title of the custom content. This title appears on the Confluence page, which shows all custom content created within a page, and on the advanced search page in the `type` dropdown list |
description | string | The description of the content action. | |
icon | string | An absolute URL to the icon that represent the custom content. It is used in SpaceCustomContentListView and PageCustomContentListView components next to each custom content title and in a search result page. Relative URLs aren't supported. A generic app icon is displayed if no icon is provided. | |
bodyType | string | Defines the content body type of this custom content. Currently, supported content body types are:
| |
supportedContainerTypes | string[] | Yes | Defines types that this custom content can be contained in. Currently, supported content types:
|
supportedChildTypes | string[] | Defines types that can be contained in this custom content. Currently, supported content types:
| |
supportedSpacePermissions | string[] | Defines the space permissions that this custom content supports. Allowable values are : read , create and delete . These permissions must be granted through the space permissions UI in order to perform the given operation. If no space permissions are defined, the default permissions are used. | |
indexing | boolean | Defines whether this content type is indexed and displayed in search results. | |
preventDuplicateTitle | boolean | Defines whether Confluence should prevent content with duplicate titles from being created in the same space or container. |
Property | Type | Description |
---|---|---|
type | string | The type of the module. |
Property | Type | Description |
---|---|---|
type | string | The type of the module. |
Rate this page: