Module: CCS::FrontendHelpers::GovUKFrontend::Breadcrumbs

Included in:
CCS::FrontendHelpers::GovUKFrontend
Defined in:
lib/ccs/frontend_helpers/govuk_frontend/breadcrumbs.rb

Overview

GOV.UK Breadcrumbs

This helper is used for generating the breadcrumbs component from the GDS - Components - Breadcrumbs

Instance Method Summary collapse

Instance Method Details

#govuk_breadcrumbs(breadcrumb_links) ⇒ ActiveSupport::SafeBuffer

Generates the HTML for the GOV.UK breadcrumbs component

Parameters:

  • breadcrumb_links (Array<Hash>)

    An array of links for the breadcrumbs list. See Link#initialize for details of the items in the array.

  • options (Hash)

    options that will be used in customising the HTML

Returns:

  • (ActiveSupport::SafeBuffer)


22
23
24
# File 'lib/ccs/frontend_helpers/govuk_frontend/breadcrumbs.rb', line 22

def govuk_breadcrumbs(breadcrumb_links, **)
  Components::GovUK::Breadcrumbs.new(context: self, breadcrumb_links: breadcrumb_links, **).render
end