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

@@ -2,12 +2,18 @@ module Adamantium
module Views
class Context < Hanami::View::Context
include Hanami::View::ContextHelpers::ContentHelpers
include Deps["repos.page_repo"]
def initialize(**options)
@options = options
super(**options)
end
def pages
page_repo.for_main_nav
end
def current_path
request.fullpath
end