%
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?)
-%>
<%= dom_id -%>>
<%= link_to menu_branch.title, menu_branch.url %>
<% unless hide_children or
(children = menu_branch.children.reject{|c| !c.in_menu?}).empty? %>
<%=
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
} -%>
<% end %>