Sha256: 4ef7d5c209e38a70f913bbb60f23427ba95b242f1a7cb8c69228d9f5f7e7b095

Contents?: true

Size: 1.4 KB

Versions: 6

Compression:

Stored size: 1.4 KB

Contents

<% navigation = GovukPublishingComponents::Presenters::ContextualNavigation.new(content_item, request.path) %>

<% if navigation.content_tagged_to_single_step_by_step? %>
  <!-- Rendering step by step nav breadcrumbs because there's 1 step by step -->
  <%= render 'govuk_publishing_components/components/step_by_step_nav_header',
    navigation.step_nav_helper.header %>
<% elsif navigation.content_tagged_to_mainstream_browse_pages? %>
  <!-- Rendering parent-based breadcrumbs because the page is tagged to mainstream browse -->
  <%= render 'govuk_component/breadcrumbs', breadcrumbs: navigation.breadcrumbs %>
<% elsif navigation.content_has_curated_related_items? %>
  <!-- Rendering parent-based breadcrumbs because the page has curated related links -->
  <%= render 'govuk_component/breadcrumbs', breadcrumbs: navigation.breadcrumbs %>
<% elsif navigation.content_is_tagged_to_a_live_taxon? %>
  <!-- Rendering taxonomy breadcrumbs because the page is tagged to live taxons -->
  <%= render 'govuk_component/breadcrumbs',
    breadcrumbs: navigation.taxon_breadcrumbs[:breadcrumbs],
    collapse_on_mobile: true %>
<% elsif navigation.breadcrumbs.any? %>
  <!-- Rendering parent-based breadcrumbs because no browse, no related links, no live taxons -->
  <%= render 'govuk_component/breadcrumbs', breadcrumbs: navigation.breadcrumbs %>
<% else %>
  <!-- Not rendering any breadcrumbs because there aren't any -->
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
govuk_publishing_components-7.3.0 app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb
govuk_publishing_components-7.2.0 app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb
govuk_publishing_components-7.1.0 app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb
govuk_publishing_components-7.0.0 app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb
govuk_publishing_components-6.7.0 app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb
govuk_publishing_components-6.6.0 app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb