Sha256: 94ff73bb20d40d31714e94af502ce03b87be35a9bacb58325235a9a1f2c901e9
Contents?: true
Size: 1.47 KB
Versions: 1
Compression:
Stored size: 1.47 KB
Contents
<% dom_id ||= 'menu' caching = (cache_menu ||= RefinerySetting.find_or_set(:cache_menu, false)) cache_key = [Refinery.base_cache_key, 'pages_menus', dom_id, Globalize.locale, cache_path ||= request.path].join('_') cache_if(caching, cache_key) do # Select top menu items unless 'roots' is supplied. if (roots ||= (collection ||= @menu_pages).where(:parent_id => nil)).present? css = [(css || 'menu'), 'clearfix'].flatten.join(' ') # In order to match items that aren't shown in menu and highlight their associations. # This can be supplied if the logic is different in your case. unless defined?(selected_item) selected_item = @page || collection.detect{|page| selected_page?(page)} end hide_children = RefinerySetting.find_or_set(:menu_hide_children, false) if hide_children.nil? -%> <nav id='<%= dom_id %>' class='<%= css %>'> <ul> <%= render :partial => '/shared/menu_branch', :collection => roots, :locals => { :hide_children => hide_children, :sibling_count => (roots.length - 1), :collection => collection, :selected_item => selected_item, :apply_css => true #if you don't care about class='first' class='last' or class='selected' set apply_css to false for speed. } -%> </ul> </nav> <% end -%> <% end -%>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
refinerycms-core-0.9.9.17 | app/views/shared/_menu.html.erb |