Sha256: 298490aa51ac6be7e86d120eea992f0d9430a3aaada92a684667c16c4e59e85e

Contents?: true

Size: 1.58 KB

Versions: 6

Compression:

Stored size: 1.58 KB

Contents

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

<div class='gem-c-contextual-breadcrumbs'>
  <% 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_publishing_components/components/breadcrumbs', breadcrumbs: navigation.breadcrumbs %>
  <% elsif navigation.content_has_curated_related_items? %>
    <!-- Rendering parent-based breadcrumbs because the page has curated related links -->
    <%= render 'govuk_publishing_components/components/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_publishing_components/components/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_publishing_components/components/breadcrumbs', breadcrumbs: navigation.breadcrumbs %>
  <% else %>
    <!-- Not rendering any breadcrumbs because there aren't any -->
  <% end %>
</div>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
govuk_publishing_components-9.7.0 app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb
govuk_publishing_components-9.6.0 app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb
govuk_publishing_components-9.5.3 app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb
govuk_publishing_components-9.5.2 app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb
govuk_publishing_components-9.5.1 app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb
govuk_publishing_components-9.5.0 app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb