Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (23 sloc) 1.034 kB
<%
css = if ((defined?(apply_css) && apply_css) || !defined?(apply_css)) and
(classes = css_for_menu_branch(menu_branch, menu_branch_counter, sibling_count||=nil)).any?
" class='#{classes.join(' ')}'"
end
dom_id = (" id='item_#{menu_branch_counter}'" if menu_branch.parent_id.nil? and menu_branch.title.present?)
@menu_pages.reject! { |branch| branch == menu_branch } # Remove page from the array, so that future searching will be faster.
children = @menu_pages.select { |p| p.parent_id == menu_branch.id && p.in_menu? }
-%>
<li<%= css -%><%= dom_id -%>>
<%= link_to menu_branch.title, menu_branch.url %>
<% unless hide_children or children.empty? %>
<ul class='clearfix'>
<%=
render :partial => "/shared/menu_branch",
:collection => children,
:locals => {
:hide_children => false, # hide children can't be true or we wouldn't get here.
:sibling_count => children.size - 1
} -%>
</ul>
<% end %>
</li>
Jump to Line
Something went wrong with that request. Please try again.