Add dynamic pages to main menu
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user