Sha256: 9aacdb47c72eb85ead56f551e3e33c78bda39e65a3e83f44f329460779419d79
Contents?: true
Size: 1.02 KB
Versions: 17
Compression:
Stored size: 1.02 KB
Contents
<%# this is pretty bad code - need to rethink this one -%> <% css = [] css << "selected" if selected_page?(page) or descendant_page_selected?(page) css << "first" if position == 0 css << "last" if position == (siblings ||= page.shown_siblings).size domid = "#{page.title.gsub(" ", "_").downcase}_item" unless page.title.blank? if page.in_menu? -%> <li<%= " class='#{css.join(' ')}'" unless css.blank? -%><%= " id='#{domid}'" unless domid.blank? -%>> <%= link_to page.title, page.url %> <% unless hide_children or (children = page.children.collect{|c| c if c.in_menu? }.compact).empty? %> <ul class='clearfix'> <% children.each do |child| -%> <% shown_siblings = child.shown_siblings %> <%= render :partial => '/shared/menu_branch', :locals => { :page => child, :position => page.children.index(child), :root => false, :siblings => shown_siblings, :hide_children => hide_children } -%> <% end %> </ul> <% end %> </li> <% end -%>
Version data entries
17 entries across 17 versions & 1 rubygems