1. Component Guide
  2. Contextual sidebar
  3. With brexit and other related links
Contextual sidebar example

With brexit and other related links

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/contextual_sidebar", {
  content_item: {
    title: "A content item",
    links: {
      taxons: [
        {
          content_id: "test",
          title: "Not Brexit",
          phase: "live",
          links: {
            parent_taxons: [
              {
                content_id: "d6c2de5d-ef90-45d1-82d4-5f2438369eea",
                title: "Brexit"
              }
            ]
          }
        }
      ],
      ordered_related_items: [
        {
          title: "Find an apprenticeship",
          base_path: "/apply-apprenticeship"
        },
        {
          title: "Training and study at work",
          base_path: "/training-study-work-your-rights"
        },
        {
          title: "Careers helpline for teenagers",
          base_path: "/careers-helpline-for-teenagers"
        }
      ],
      document_collections: [
        {
          title: "Recruit an apprentice (formerly apprenticeship vacancies)",
          base_path: "/government/collections/apprenticeship-vacancies",
          document_type: "document_collection"
        },
        {
          title: "The future of jobs and skills",
          base_path: "/government/collections/the-future-of-jobs-and-skills",
          document_type: "document_collection"
        }
      ]
    }
  }
} %>