def active_navigation_item(options = {}, value_for_nil = nil)
      if options[:level].nil? || options[:level] == :all
        options[:level] = :leaves
      end
      container = active_navigation_item_container(options)
      if container && (item = container.selected_item)
        block_given? ? yield(item) : item
      else
        value_for_nil
      end
    end
def active_navigation_item(options = {}, value_for_nil = nil)
      if options[:level].nil? || options[:level] == :all
        options[:level] = :leaves
      end
      container = active_navigation_item_container(options)
      if container && (item = container.selected_item)
        block_given? ? yield(item) : item
      else
        value_for_nil
      end
    end
Returns the currently active navigation item belonging to the specified
 level.

 The following options are supported:
 * <tt>:level</tt> - defaults to :all which returns the
   most specific/deepest selected item (the leaf).
   Specify a specific level to only look for the selected item in the
   specified level of navigation
   (e.g. level: 1 for primary_navigation, etc).
 * <tt>:context</tt> - specifies the context for which you would like to
   find the active navigation item. Defaults to :default which loads the
   default navigation.rb (i.e. config/navigation.rb).
   If you specify a context then the plugin tries to load the configuration
   file for that context, e.g. if you call
   <tt>active_navigation_item_name(context: :admin)</tt> the file
   config/admin_navigation.rb will be loaded and used for searching the
   active item.
 * <tt>:items</tt> - you can specify the items directly (e.g. if items are
   dynamically generated from database).
   See SimpleNavigation::ItemsProvider for documentation on what to provide
   as items.

 Returns the supplied <tt>value_for_nil</tt> object (<tt>nil</tt>
 by default) if no active item can be found for the specified
 options