Link the Documentation Page to its Extension or Package
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. The Technical ID displays an "Extension" (or "NPM") badge at the bottom of the page. Since version 1.22 of the Documentation Application, it also displays a bar under the title of the Administrator pages of non-bundled extensions (under Documentation for Extensions). The bar names the extension and links to its page on extensions.xwiki.org (see the documentation page structure of XWiki.org). That bar is how administrators know which extension to install, so these pages must have a Technical ID, and their text doesn't need to name or link the extension.
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:

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

- 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).
- Paste the id from there, prefixed with xwiki: (e.g. xwiki:org.xwiki.platform:xwiki-platform-icon-api), or npm:<package id> for an NPM package, in the Technical Id field of the documentation page. An ID without the prefix still works for historical reasons, but the prefix is required.
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. The prefix (e.g. xwiki:) must therefore be in both fields: change both or neither.
Fill In the NPM Package
- Go to npmjs.com.
- Search for the XWiki package you are looking for.