Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added possibility to pass options to the cms_render_navigation helper.

  • Loading branch information...
commit 0ef4f4154f2955ef9a6c7fba428be4ccb5e4f941 1 parent 5fb9c19
@robotex82 authored
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)
Please sign in to comment.
Something went wrong with that request. Please try again.