diff --git a/app/models/communication/website/page/accessibility.rb b/app/models/communication/website/page/accessibility.rb index a9819518ef78045d98d64203e9fecb33087f9376..ef0fd58644fee35315173bb0b4054fad8995cf4d 100644 --- a/app/models/communication/website/page/accessibility.rb +++ b/app/models/communication/website/page/accessibility.rb @@ -44,5 +44,9 @@ class Communication::Website::Page::Accessibility < Communication::Website::Page def draftable? false end + + def is_listed_among_children? + false + end end diff --git a/app/models/communication/website/page/legal_term.rb b/app/models/communication/website/page/legal_term.rb index 61ef387ca2740c5c9c48dae2c6d5603b34eabebe..607cf9cf2709beeb9f445d5ffe745076925972b0 100644 --- a/app/models/communication/website/page/legal_term.rb +++ b/app/models/communication/website/page/legal_term.rb @@ -44,5 +44,9 @@ class Communication::Website::Page::LegalTerm < Communication::Website::Page def draftable? false end + + def is_listed_among_children? + false + end end diff --git a/app/models/communication/website/page/privacy_policy.rb b/app/models/communication/website/page/privacy_policy.rb index 4b7d8da2638870a8c1c4fe0f245d251788a243f8..e94f7b8854b23d129df9afc513bf8ee8fb945b4a 100644 --- a/app/models/communication/website/page/privacy_policy.rb +++ b/app/models/communication/website/page/privacy_policy.rb @@ -44,5 +44,9 @@ class Communication::Website::Page::PrivacyPolicy < Communication::Website::Page def draftable? false end + + def is_listed_among_children? + false + end end diff --git a/app/models/communication/website/page/sitemap.rb b/app/models/communication/website/page/sitemap.rb index b1c16f4ec42c1d13b76edba815e297c6f188173b..6da00584bc11275950ea23f0411cae9d3415d1e1 100644 --- a/app/models/communication/website/page/sitemap.rb +++ b/app/models/communication/website/page/sitemap.rb @@ -56,6 +56,10 @@ class Communication::Website::Page::Sitemap < Communication::Website::Page def show_toc? true end + + def is_listed_among_children? + false + end def static_layout 'sitemap' diff --git a/app/models/communication/website/page/with_type.rb b/app/models/communication/website/page/with_type.rb index e8d5829bf2eb690f8179e92edff97b761a59e16c..c465ecd000765298eb3fe26fdbe044371d2e4586 100644 --- a/app/models/communication/website/page/with_type.rb +++ b/app/models/communication/website/page/with_type.rb @@ -54,6 +54,10 @@ module Communication::Website::Page::WithType true end + def is_listed_among_children? + true + end + def editable_width? true end diff --git a/app/views/admin/communication/websites/pages/static.html.erb b/app/views/admin/communication/websites/pages/static.html.erb index e9297aaa5b6d4a3948eb63d95c6d2fed6e4196d6..84092f13b66caa1dddcf1cf8e7d6910d68b2974b 100644 --- a/app/views/admin/communication/websites/pages/static.html.erb +++ b/app/views/admin/communication/websites/pages/static.html.erb @@ -19,7 +19,10 @@ bodyclass: <%= @about.best_bodyclass %> <%= render 'admin/application/featured_image/static' %> <% if @about.children.published.any? %> children: -<% @about.children.published.ordered.each do |child| %> +<% +@about.children.published.ordered.each do |child| + next unless child.is_listed_among_children? +%> - <%= child.path %> <% end %> <% end %>