Skip to content
Browse files

Added possibility to pass options to the cms_render_navigation helper.

  • Loading branch information...
1 parent 5fb9c19 commit 0ef4f4154f2955ef9a6c7fba428be4ccb5e4f941 @robotex82 committed Apr 7, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 app/helpers/ecm/cms_navigation_helper.rb
View
8 app/helpers/ecm/cms_navigation_helper.rb
@@ -4,14 +4,16 @@ def cms_render_navigation(name, options = {})
return I18n.t('ecm.navigation.navigation_not_found', :name => name) unless navigation
- items = []
+ options[:items] = []
navigation.navigation_items.roots.all.each do |navigation_item|
- items << build_navigation(navigation_item)
+ options[:items] << build_navigation(navigation_item)
end
return I18n.t('ecm.navigation.navigation_empty', :name => name) if items.empty?
- render_navigation :items => items, options
+ options[:items] = items
+
+ render_navigation(options)
end
def build_navigation(navigation_item)

0 comments on commit 0ef4f41

Please sign in to comment.
Something went wrong with that request. Please try again.