Link the Documentation Page to its Extension or Package

Last modified by Eleni Cojocariu on 2026/09/07 20:12

Each documentation page must document either a specific extension or an NPM package. There are, however, cases such as installation or upgrade pages, where the documentation does not relate to any specific extension. In those cases, no Technical ID needs to be associated with the page.

When a documentation page does document a specific extension or NPM package, it must be associated with the Technical ID of what it documents:

  • the extension ID, if the page documents an XWiki extension,
  • the NPM package name, if the page documents an NPM package.

This association is important because the documentation is considered part of the extension it documents. For example, if an extension is removed, its documentation could easily be also removed with it.

When creating a documentation page, you must fill in the "Technical ID" field within the documentation page structure of XWiki.org, if the page has a "Technical ID" associated. In cases where no "Technical ID" is linked (for example, installation pages), you do not need to fill in this field. Filling this links each documentation page on the main wiki to the extension it comes from, or to the NPM package it comes from.

Fill In the Extension Id to the Page

To fill in the Extension ID for a documentation page,

1.Make sure the documentation page has an object of type DocApp.Code.DocumentationExtensionClass. This object contains the Technical Id field, which is where you will fill in the ID:

technical-id.png

  1. Go to the extension page that provides the feature documented in your page.
  2. Locate the Id metadata, which is stored in the xobject of type ExtensionCode Class.
  3. Access and copy the ID using the Object Editor, as illustrated below:

    DocId.png

    • If the extension page does not exist on Extensions, it needs to be imported. Make sure to handle the extension page properly and add the "Documentation" button as described.
    • If the page exists but the Id field is not filled in, it needs to be completed.
      • The Extension id follows the format <groupId>:<artifactId>, where the artifactId corresponds to the extension name (e.g., org.xwiki.platform:xwiki-platform-icon-api).
  4. Paste the id from there in the Technical Id field from the documentation page.

Note: This extension ID from the Technical Id field must match exactly the one filled in the "Website" field from the extension page, so that the "Documentation" button correctly lists the documentation pages associated with this extension ID. If the extension ID is prefixed (e.g., with xwiki:) in this field, the same prefix must also be specified in the "Website" field.

Fill In the NPM Package

  1. Go to npmjs.com.
  2. Search for the XWiki package you are looking for.

Get Connected