Skip to content

Commit

Permalink
Hide navigations if none are present in theme config - Fixes #1322 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Bramjetten authored Oct 19, 2023
1 parent 370c8cb commit a7b1f87
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/spina/admin/shared/_navigation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
<%= render Spina::MainNavigation::LinkComponent.new t('spina.website.pages'), spina.admin_pages_path, active: controller_name.in?(%w(pages resources)) %>
<%= render Spina::MainNavigation::LinkComponent.new t('spina.navigations.navigations'), spina.admin_navigations_path, active: controller_name == "navigations" %>
<% if Spina::Current.theme.navigations.present? %>
<%= render Spina::MainNavigation::LinkComponent.new t('spina.navigations.navigations'), spina.admin_navigations_path, active: controller_name == "navigations" %>
<% end %>
<% if Spina::Current.theme.layout_parts.present? %>
<%= render Spina::MainNavigation::LinkComponent.new t('spina.layout.layout'), spina.edit_admin_layout_path, active: controller_name == "layout" %>
Expand Down

0 comments on commit a7b1f87

Please sign in to comment.