Class: GovukNavigationHelpers::NavigationHelper
- Inherits:
-
Object
- Object
- GovukNavigationHelpers::NavigationHelper
- Defined in:
- lib/govuk_navigation_helpers.rb
Instance Method Summary collapse
-
#breadcrumbs ⇒ Hash
Generate a breadcrumb trail.
-
#initialize(content_item) ⇒ NavigationHelper
constructor
A new instance of NavigationHelper.
-
#related_items ⇒ Hash
Generate a related items payload.
-
#taxon_breadcrumbs ⇒ Hash
Generate a breadcrumb trail for a taxon, using the taxon_parent link field.
-
#taxonomy_sidebar ⇒ Hash
Generate a payload containing taxon sidebar data.
Constructor Details
#initialize(content_item) ⇒ NavigationHelper
17 18 19 |
# File 'lib/govuk_navigation_helpers.rb', line 17 def initialize(content_item) @content_item = content_item end |
Instance Method Details
#breadcrumbs ⇒ Hash
Generate a breadcrumb trail
25 26 27 |
# File 'lib/govuk_navigation_helpers.rb', line 25 def Breadcrumbs.new(content_item). end |
#related_items ⇒ Hash
Generate a related items payload
50 51 52 |
# File 'lib/govuk_navigation_helpers.rb', line 50 def .new(content_item). end |
#taxon_breadcrumbs ⇒ Hash
Generate a breadcrumb trail for a taxon, using the taxon_parent link field
33 34 35 |
# File 'lib/govuk_navigation_helpers.rb', line 33 def TaxonBreadcrumbs.new(content_item). end |
#taxonomy_sidebar ⇒ Hash
Generate a payload containing taxon sidebar data. Intended for use with the related items component.
42 43 44 |
# File 'lib/govuk_navigation_helpers.rb', line 42 def .new(content_item). end |