Editing RefineryCMS 2.1 Menu Presenter to manipulate dom_id css and other
attributes
I am currently trying to update an existing RefineryCMS app from gem version
gem "refinerycms", "~> 2.0.10"
to
gem "refinerycms", "~> 2.1.0"
After removing outdated blocks and deleting a couple overridden views from
the site's past I have got the site successfully functioning again with
its current database's content.
Now I would like to be able to target and configure the new RefineryCMS
Menu Presenters CSS/HTML. *They have removed the menu and menu_branches
approach in 2.1*
The RefineryCMS 2.1 guides for menu presenters:
http://refinerycms.com/guides/menu-presenter show how to include a
secondary menu system at the bottom of the site.
Unfortunately I only half understand what is taking place in the
decorators and helpers mentioned. This lack of understanding is preventing
me from using this guide to manipulate the main and existing menu.
Should I be editing one of refinery's existing files or creating a helper
for myself that targets the the new Menu Presenter's CSS/HTML and if so
should it be similar to what step 3. in the mention guide shows?
def footer_menu
menu_items = Refinery::Menu.new(Refinery::Page.footer_menu_pages)
presenter = Refinery::Pages::MenuPresenter.new(menu_items, self)
presenter.dom_id = "footer_menu"
presenter.css = "footer_menu"
presenter.menu_tag = :div
presenter
end
Obviously the name footer_menu and any else referencing their footer
example is incorrect.
No comments:
Post a Comment