Metadata block example

Extensive

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/metadata", {
  from: [
    sanitize("<a href='/government/organisations/ministry-of-defence'>Ministry of Defence</a>"),
    sanitize("<a href='/government/organisations/cabinet-office'>Cabinet Office</a>"),
    sanitize("<a href=\"/government/organisations/department-for-business-energy-and-industrial-strategy\">Department for Business, Energy &amp; Industrial Strategy</a>"),
    sanitize("<a href=\"/government/organisations/foreign-commonwealth-office\">Foreign &amp; Commonwealth Office</a>"),
    sanitize("<a href=\"/government/people/william-hague\">The Rt Hon William Hague</a>"),
    sanitize("<a href=\"/government/organisations/department-for-environment-food-rural-affairs\">Department for Environment, Food &amp; Rural Affairs</a>"),
    sanitize("<a href=\"/government/organisations/department-for-work-pensions\">Department for work and pensions</a>"),
    sanitize("<a href=\"/government/organisations/foreign-commonwealth-office\">Foreign and Commonwealth Office</a>")
  ],
  history: "Updated 2 weeks ago",
  part_of: [
    sanitize("<a href='/government/topics/energy'>Energy</a>"),
    sanitize("<a href='/government/topics/environment'>Environment</a>")
  ],
  other: {
    "Related topics": [
      sanitize("<a href='/government/topics/topic-1'>Topic 1</a>"),
      sanitize("<a href='/government/topics/topic-2'>Topic 2</a>"),
      sanitize("<a href='/government/topics/topic-3'>Topic 3</a>"),
      sanitize("<a href='/government/topics/topic-4'>Topic 4</a>"),
      sanitize("<a href='/government/topics/topic-5'>Topic 5</a>"),
      sanitize("<a href='/government/topics/topic-6'>Topic 6</a>"),
      sanitize("<a href='/government/topics/topic-7'>Topic 7</a>"),
      sanitize("<a href='/government/topics/topic-8'>Topic 8</a>"),
      sanitize("<a href='/government/topics/topic-9'>Topic 9</a>")
    ],
    "Applies to": "England"
  }
} %>