def render_navigation(options = {}, html_options = {})
      options = {
        submenu: false,
        all_sub_menues: false,
        from_page: @root_page || Language.current_root_page,
        spacer: nil,
        navigation_partial: 'alchemy/navigation/renderer',
        navigation_link_partial: 'alchemy/navigation/link',
        show_nonactive: false,
        restricted_only: false,
        show_title: true,
        reverse: false,
        reverse_children: false
      }.merge(options)
      page = page_or_find(options[:from_page])
      return nil if page.blank?
      pages = page.children.accessible_by(current_ability, :see)
      pages = pages.restricted if options.delete(:restricted_only)
      if depth = options[:deepness]
        pages = pages.where('depth <= ?', depth)
      end
      if options[:reverse]
        pages.reverse!
      end
      render options[:navigation_partial],
        options: options,
        pages: pages,
        html_options: html_options
    end
def render_navigation(options = {}, html_options = {})
      options = {
        submenu: false,
        all_sub_menues: false,
        from_page: @root_page || Language.current_root_page,
        spacer: nil,
        navigation_partial: 'alchemy/navigation/renderer',
        navigation_link_partial: 'alchemy/navigation/link',
        show_nonactive: false,
        restricted_only: false,
        show_title: true,
        reverse: false,
        reverse_children: false
      }.merge(options)
      page = page_or_find(options[:from_page])
      return nil if page.blank?
      pages = page.children.accessible_by(current_ability, :see)
      pages = pages.restricted if options.delete(:restricted_only)
      if depth = options[:deepness]
        pages = pages.where('depth <= ?', depth)
      end
      if options[:reverse]
        pages.reverse!
      end
      render options[:navigation_partial],
        options: options,
        pages: pages,
        html_options: html_options
    end
Renders the navigation.

 It produces a html <ul><li></li></ul> structure with all necessary classes so you can produce every navigation the web uses today.
 I.E. dropdown-navigations, simple mainnavigations or even complex nested ones.

 === HTML output:

   <ul class="navigation level_1">
     <li class="first home"><a href="/home" class="active" title="Homepage" lang="en" data-page-id="1">Homepage</a></li>
     <li class="contact"><a href="/contact" title="Contact" lang="en" data-page-id="2">Contact</a></li>
     <li class="last imprint"><a href="/imprint" title="Imprint" lang="en" data-page-id="3">Imprint</a></li>
   </ul>

 As you can see: Everything you need.

 Not pleased with the way Alchemy produces the navigation structure?

 Then feel free to overwrite the partials (_renderer.html.erb and _link.html.erb) found in +views/navigation/+ or pass different partials via the options +:navigation_partial+ and +:navigation_link_partial+.

 === Passing HTML classes and ids to the renderer

 A second hash can be passed as html_options to the navigation renderer partial.

 ==== Example:

   <%= render_navigation({from_page: 'subnavi'}, {class: 'navigation', id: 'subnavigation'}) %>


 @option options submenu [Boolean] (false)
   Do you want a nested <ul> <li> structure for the deeper levels of your navigation, or not?
   Used to display the subnavigation within the mainnaviagtion. I.e. for dropdown menues.

 @option options all_sub_menues [Boolean] (false)
   Renders the whole page tree.

 @option options from_page [Alchemy::Page] (@root_page)
   Do you want to render a navigation from a different page then the current page?
   Then pass an Page instance or a Alchemy::PageLayout name as string.

 @option options spacer [String] (nil)
   A spacer for the entries can be passed.
   Simple string, or even a complex html structure.
   I.e: "<span class='spacer'>|</spacer>".

 @option options navigation_partial [String] ("navigation/renderer")
   Pass a different partial to be taken for the navigation rendering.
   Alternatively you could override the +app/views/alchemy/navigation/renderer+ partial in your app.

 @option options navigation_link_partial [String] ("navigation/link")
   Alchemy places an <a> html link in <li> tags.
   The tag automatically has an active css class if necessary.
   So styling is everything. But maybe you don't want this.
   So feel free to make you own partial and pass the filename here.
   Alternatively you could override the +app/views/alchemy/navigation/link+ partial in your app.

 @option options show_nonactive [Boolean] (false)
   Commonly Alchemy only displays the submenu of the active page (if submenu: true).
   If you want to display all child pages then pass true (together with submenu: true of course).
   I.e. for css-driven drop down menues.

 @option options show_title [Boolean] (true)
   For our beloved SEOs :)
   Appends a title attribute to all links and places the +page.title+ content into it.

 @option options restricted_only [Boolean] (false)
   Render only restricted pages. I.E for members only navigations.

 @option options reverse [Boolean] (false)
   Reverse the output of the pages

 @option options reverse_children [Boolean] (false)
   Like reverse option, but only reverse the children of the first level

 @option options deepness [Fixnum] (nil)
   Show only pages up to this depth.