-
Type:
Suggestion
-
Resolution: Unresolved
-
Component/s: Forge - Macro Extension Point
Issue Summary
The adfExport function in the app does not provide version-specific rendering, as it lacks information about the page version in the payload object.
Steps to Reproduce
- Use the adfExport function in the app.
- Attempt to render content based on the page version.
Expected Results
The adfExport function should provide version-specific content based on the page version being viewed.
Actual Results
The adfExport function does not indicate the page version, resulting in non-version-specific content rendering.
Workaround
To obtain the version of the page currently being rendered in the adfExport function, you’ll need to use the Confluence REST API, as the adfExport function itself doesn’t include version information.
- Use the Confluence REST API: You can use the /rest/api/content/{id}/version endpoint to retrieve version details for a specific page. This will provide the version number along with other relevant information. You can find more details in the The Confluence Cloud REST API.
- Integrate with adfExport: After fetching the version information from the API, you can incorporate this data into your adfExport function to conditionally render content based on the page version.
Since the adfExport function doesn’t provide direct access to the version being rendered, making an external API call is necessary to retrieve that information.