Add dynamic pages to main menu

This commit is contained in:
2024-01-01 17:10:30 +11:00
parent 689fc7cff6
commit 5f6e3fd86f
7 changed files with 944 additions and 13 deletions

View File

@@ -6,6 +6,14 @@ module Adamantium
.published
.where(slug: slug).one!
end
def for_main_nav
pages
.select(:name, :slug, :light_colour, :dark_colour, :published_at)
.published
.where(main_menu: true)
.to_a
end
end
end
end