The following example relies on:
- The Map variable, which gives access to the
ft:lastEditionvalue of the document. - The
FluidTopicsDateService.format(), which adapts theft:lastEditionraw value (for example,2025-06-17) to a format matching the user's language (for example,Jun 17, 2025for English).
To add the same Custom component:
-
In the HTML panel, copy and paste the following:
<ft-tooltip text="Last edition" delay="500" position="bottom"> <ft-chip icon="EDIT" iconvariant="fluid-topics"><span>Date</span></ft-chip> </ft-tooltip> -
In the CSS panel, copy and paste the following:
const options = { longFormat: true }; const formattedDate = FluidTopicsDateService.format(map.lastEdition, options); document.querySelector("span").innerText = formattedDate; -
In the JS panel, copy and paste the following:
ft-chip { --ft-chip-vertical-padding: 3.5px; --ft-chip-horizontal-padding: 4px; } -
Save the component.
-
Save and publish the page.