Sha256: 6b87d59942ea4eaf25c975c398122b08f68925b48359386be346696ec9b02969

Contents?: true

Size: 1.67 KB

Versions: 21

Compression:

Stored size: 1.67 KB

Contents

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

<div class="gem-c-contextual-sidebar">
  <% if navigation.content_tagged_to_a_reasonable_number_of_step_by_steps? %>
    <!-- Rendering step by step related items because there are a few but not too many of them -->
    <%= render 'govuk_publishing_components/components/step_by_step_nav_related', links: navigation.step_nav_helper.related_links %>
  <% end %>

  <% if navigation.content_tagged_to_single_step_by_step? %>
    <!-- Rendering step by step sidebar because there's 1 step by step list -->
    <%= render 'govuk_publishing_components/components/step_by_step_nav', navigation.step_nav_helper.sidebar %>
  <% elsif navigation.content_tagged_to_mainstream_browse_pages? %>
    <!-- Rendering related navigation sidebar because the page is tagged to mainstream browse -->
    <%= render 'govuk_publishing_components/components/related_navigation', content_item %>
  <% elsif navigation.content_has_curated_related_items? %>
    <!-- Rendering related navigation sidebar because the page has curated related links -->
    <%= render 'govuk_publishing_components/components/related_navigation', content_item %>
  <% elsif navigation.content_is_tagged_to_a_live_taxon? %>
    <!-- Rendering taxonomy sidebar because the page is tagged to live taxons -->
    <%= render 'govuk_publishing_components/components/taxonomy_navigation', navigation.taxonomy_sidebar %>
  <% else %>
    <!-- Rendering related navigation sidebar because no browse, no related links, no live taxons -->
    <%= render 'govuk_publishing_components/components/related_navigation', content_item %>
  <% end %>
</div>

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
govuk_publishing_components-9.17.1 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.17 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.16.1 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.16.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.15.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.14.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.13.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.12.2 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.12.1 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.12.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.11.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.10.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.9.1 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.9.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.8.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.7.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.6.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.5.3 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.5.2 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-9.5.1 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb