1. Collections Component Guide
  2. Taxon list
  3. With data attributes
Taxon list example

With data attributes

Arbitrary data attributes can be included with each link, usually for analytics tracking.

How it looks (preview)

  1. Adult Dependants' Grant

    Adult Dependants' Grant for full-time students who financially support an adult - funding, how to apply, eligibility

  2. Care to Learn

    Care to Learn helps pay for childcare while you're studying - how to apply, money you get, courses that qualify, eligibility

How to call this example

<%= render "components/taxon_list", {
  items: [
    {
      text: "Adult Dependants' Grant",
      path: "/adult-dependants-grant",
      description: "Adult Dependants' Grant for full-time students who financially support an adult - funding, how to apply, eligibility",
      data_attributes: {
        track_category: "navSubtopicContentItemLinkClicked",
        track_action: 1.1,
        track_label: "/green-taxes-and-reliefs",
        track_options: {
          dimension28: 2,
          dimension29: "Environmental taxes, reliefs and schemes for businesses"
        }
      }
    },
    {
      text: "Care to Learn",
      path: "/care-to-learn",
      description: "Care to Learn helps pay for childcare while you're studying - how to apply, money you get, courses that qualify, eligibility",
      data_attributes: {
        track_category: "navSubtopicContentItemLinkClicked",
        track_action: 1.2,
        track_label: "/guidance/aggregates-levy-register-or-change-your-details",
        track_options: {
          dimension28: 2,
          dimension29: "Aggregates Levy: register or change your details"
        }
      }
    }
  ]
} %>