Document list example

With data attributes on links

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/document_list", {
  items: [
    {
      link: {
        text: "School behaviour and attendance: parental responsibility measures",
        path: "/government/publications/parental-responsibility-measures-for-behaviour-and-attendance",
        data_attributes: {
          a_thing: "hello",
          another_thing: "there",
          more_things: {
            look: "over",
            there: "now"
          }
        }
      },
      metadata: {
        public_updated_at: "2017-01-05 14:50:33 +0000",
        document_type: "Statutory guidance"
      }
    },
    {
      link: {
        text: "School exclusion",
        path: "/government/publications/school-exclusion",
        data_attributes: {
          a_thing: "hello",
          another_thing: "there",
          more_things: {
            look: "over",
            there: "now"
          }
        }
      },
      metadata: {
        public_updated_at: "2017-07-19 16:01:48 +0100",
        document_type: "Statutory guidance"
      }
    }
  ]
} %>