Skip to content

Commit a4b8c00

Browse files
authored
Merge pull request #947 from alphagov/no-double-breadcrumbs
Avoid double breadcrumbs on service sign in pages
2 parents 4cfe647 + 8b8e6f1 commit a4b8c00

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

app/views/content_items/service_sign_in/_choose_sign_in.html.erb

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<%= render "govuk_publishing_components/components/back_link", href: @content_item.back_link %>
2-
31
<% if @error %>
42
<div class="grid-row">
53
<div class="column-two-thirds">

app/views/content_items/service_sign_in/_create_new_account.html.erb

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<%= render "govuk_publishing_components/components/back_link", href: @content_item.back_link %>
2-
31
<div class="grid-row">
42
<div class="column-two-thirds">
53
<%= render 'govuk_publishing_components/components/title', title: @content_item.title %>

app/views/layouts/application.html.erb

+7-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@
3434

3535
<div id="wrapper" class="<%= wrapper_class %>">
3636
<%= render_phase_label @content_item, content_for(:phase_message) %>
37-
<%= render 'govuk_publishing_components/components/contextual_breadcrumbs', content_item: @content_item.content_item.parsed_content %>
37+
38+
<% if @content_item.try(:back_link) %>
39+
<%= render 'govuk_publishing_components/components/back_link', href: @content_item.back_link %>
40+
<% else %>
41+
<%= render 'govuk_publishing_components/components/contextual_breadcrumbs', content_item: @content_item.content_item.parsed_content %>
42+
<% end %>
43+
3844
<main role="main" id="content" class="<%= @content_item.schema_name.dasherize %>" lang="<%= I18n.locale %>">
3945
<%= yield %>
4046
</main>

0 commit comments

Comments
 (0)