forked from refinery/refinerycms
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git@github.com:resolve/refinerycms into them…
…e_support
- Loading branch information
Showing
2 changed files
with
22 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
<% | ||
# cache important lookups | ||
hide_children = RefinerySetting.find_or_set(:menu_hide_children, false) | ||
siblings = nil # all pages in the top level menu have the same siblings, basically. | ||
cache(:action_suffix => "site_menu") do | ||
# cache important lookups | ||
hide_children = RefinerySetting.find_or_set(:menu_hide_children, false) | ||
siblings = nil # all pages in the top level menu have the same siblings, basically. | ||
%> | ||
<ul id='<%= dom_id ||= "menu" %>' class='menu clearfix'> | ||
<% @menu_pages.each do |page| -%> | ||
<%= render :partial => '/shared/menu_branch', :locals => { | ||
:page => page, | ||
:position => @menu_pages.index(page), | ||
:root => true, | ||
:siblings => ((siblings ||= page.shown_siblings) - [self]), | ||
:hide_children => hide_children | ||
} -%> | ||
<% end -%> | ||
</ul> | ||
<ul id='<%= dom_id ||= "menu" %>' class='menu clearfix'> | ||
<% @menu_pages.each do |page| -%> | ||
<%= render :partial => '/shared/menu_branch', :locals => { | ||
:page => page, | ||
:position => @menu_pages.index(page), | ||
:root => true, | ||
:siblings => ((siblings ||= page.shown_siblings) - [self]), | ||
:hide_children => hide_children | ||
} -%> | ||
<% end -%> | ||
</ul> | ||
<% end %> |