RefineryCMS 2.1.0和Zurb 4顶部菜单,具有下拉导航 [英] RefineryCMS 2.1.0 and Zurb 4 Top menu with dropdown navigation

查看:232
本文介绍了RefineryCMS 2.1.0和Zurb 4顶部菜单,具有下拉导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Zurb的基金会风格的应用程序建立与最新版本的炼油厂。我按照本指南开始

I'm trying to use Zurb foundation to style an app built with the latest version of refinery. I began by following this guide

http://blog.flatironschool.com/post/54511602806/build-a-blog-based-site-with-refinerycms

但最新版本的炼油厂使用菜单呈现器来布局菜单。

but the latest version of refinery uses "menu-presenter" to layout the menu.

我有这么远:

module ApplicationHelper


   def zurb_menu
      menu_items = Refinery::Menu.new(Refinery::Page.in_menu)

      presenter = Refinery::Pages::MenuPresenter.new(menu_items, self)
      presenter.css = "top-bar-section"
      presenter.dom_id = nil
      presenter.menu_tag = :section
      presenter.list_tag = "ul class='left'"
      presenter
   end
end

一些作品,但元素不是很正确,主要的问题是,我不知道如何或在哪里添加下拉类,使子元素下拉。使用上面的代码,子元素只是一直扩展。

This sort of works, However the elements aren't quite right and the main problem is that the I don't know how or where to add the dropdown class to make the child elements dropdown. With the code above the child elements are just expanded all the time.

感谢您的帮助

推荐答案

而不是 in_menu ,如果您使用 fast_menu ,则可以重新排序页面。 menu_pages可以工作,但是它不会按照与管理员相同的顺序呈现页面。希望这有助于某人。

instead of in_menu if you use fast_menu, then you will be able to reorder pages. menu_pages works, but you it will not render pages in the same order as they are in admin. hope this helps someone.

menu_items = Refinery :: Menu.new(Refinery :: Page.menu_pages)

menu_items = Refinery::Menu.new(Refinery::Page.menu_pages)

menu_items = Refinery :: Menu.new(Refinery :: Page.fast_menu)

这篇关于RefineryCMS 2.1.0和Zurb 4顶部菜单,具有下拉导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆