1. Static Component Guide
  2. Related items
  3. Real example

Related items example

Real example

How to call this example

<%= render "govuk_component/related_items" {
  sections: [
    {
      title: "Pregnancy and birth",
      url: "/browse/childcare-parenting/pregnancy-birth",
      id: "related-pregnancy-and-birth",
      items: [
        {
          title: "Register a birth",
          url: "/register-birth"
        }
      ]
    },
    {
      title: "Elsewhere on GOV.UK",
      id: "related-elsewhere-on-govuk",
      items: [
        {
          title: "Check if you're a British citizen",
          url: "/check-british-citizen"
        }
      ]
    }
  ]
} %>

How it looks