Metadata block example
Last updated and link to see details
If a last_updated value exists and see_updates_link is set to true, a “See all updates” link will be shown.
The link’s href will be set to #full-publication-update-history to match the ID of the page history displayed in a second metadata component at the bottom of the page (for example on Set up a Driver CPC training centre).
Clicking on this link will jump to the page history at the bottom of the page. Because the ID is contained within a details element, it will also automatically open that element so that the page history is visible.
On this component guide page, clicking the link will jump to the example below, and open the details element there.
How it looks (preview)
How to call this example
<%= render "govuk_publishing_components/components/metadata", {
last_updated: "10 September 2015",
see_updates_link: true
} %>