Ror制作水平导航菜单
Memu帮助类: #encoding: utf-8 module MenuHelper def topmenu pages = { "pages" => { :name => '首页', :link => root_path}, "recent" => { :name => '最新', :link => recent_path }, "hot" => { :name => '热门', :link => hot_path }, "class" => { :name => '分类', :link => class_path } } pages.map do |key, value| classnames = ' class=current-menu-item' if controller.controller_name == key "
阅读量: 702
发布于:
修改于:
发布于:
修改于: