Created
June 15, 2020 16:51
-
-
Save wakproductions/bc14555f2050cbb266215b25d3cb5e4e to your computer and use it in GitHub Desktop.
Refinery CMS - Bootstrap Menu Presenter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/ views/refinery/_header.html.slim | |
nav#logo.navbar.navbar-light.navbar-expand(itemtype = "http://schema.org/Organization") | |
= link_to(Refinery::Core.site_name, refinery.root_path, class: 'navbar-brand', itemprop: 'url') | |
= cache [I18n.locale, 'main_menu', @page, Refinery::Page.fast_menu.map(&:updated_at).max] do | |
= bootstrap_main_menu(refinery_menu_pages, self).to_html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# helpers/application_helper.rb | |
module ApplicationHelper | |
def bootstrap_main_menu(items, context) | |
presenter = Refinery::Pages::BootstrapMainMenuPresenter.new(items, context) | |
presenter.menu_role = 'navigation' | |
presenter | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment