diff --git a/app/models/communication/website/menu/item.rb b/app/models/communication/website/menu/item.rb index 707c9f7bf940aa34ea0243e95fa70cebda540ff1..11c7c01ef7110bf03504b4d6fc004301ece8929b 100644 --- a/app/models/communication/website/menu/item.rb +++ b/app/models/communication/website/menu/item.rb @@ -77,7 +77,9 @@ class Communication::Website::Menu::Item < ApplicationRecord case self.kind when 'url' target = url - when 'page', 'news_article' + when 'page' + target = about.path if about&.published + when 'news_article' target = about.path if about&.published_at when 'programs' target = "/#{website.programs_github_directory}" if website.programs.any?