1. Collections Component Guide
  2. Contextual sidebar
  3. With brexit cta
Contextual sidebar example

With brexit cta

For documents tagged with certain taxons defined in brexit_cta_taxon_allow_list we show a custom Brexit call to action element.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/contextual_sidebar", {
  content_item: {
    title: "Transport news story",
    content_id: "3c402d90-fe77-49b9-a8aa-1800d4fc2b3d",
    locale: "en",
    links: {
      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"
        }
      ],
      taxons: [
        {
          content_id: "a4038b29-b332-4f13-98b1-1c9709e216bc",
          title: "Transport",
          phase: "live"
        }
      ]
    }
  }
} %>