def render_elements(options = {})
      options = {
        from_page: @page,
        render_format: 'html'
      }.update(options)

      if options[:sort_by]
        Alchemy::Deprecation.warn "options[:sort_by] has been removed without replacement. " \
          "Please implement your own element sorting by passing a custom finder instance to options[:finder]."
      end

      if options[:from_cell]
        Alchemy::Deprecation.warn "options[:from_cell] has been removed without replacement. " \
          "Please `render element.nested_elements.available` instead."
      end

      finder = options[:finder] || Alchemy::ElementsFinder.new(options)
      elements = finder.elements(page: options[:from_page])

      buff = []
      elements.each_with_index do |element, i|
        buff << render_element(element, options, i + 1)
      end
      buff.join(options[:separator]).html_safe
    end
def render_elements(options = {})
      options = {
        from_page: @page,
        render_format: 'html'
      }.update(options)

      if options[:sort_by]
        Alchemy::Deprecation.warn "options[:sort_by] has been removed without replacement. " \
          "Please implement your own element sorting by passing a custom finder instance to options[:finder]."
      end

      if options[:from_cell]
        Alchemy::Deprecation.warn "options[:from_cell] has been removed without replacement. " \
          "Please `render element.nested_elements.available` instead."
      end

      finder = options[:finder] || Alchemy::ElementsFinder.new(options)
      elements = finder.elements(page: options[:from_page])

      buff = []
      elements.each_with_index do |element, i|
        buff << render_element(element, options, i + 1)
      end
      buff.join(options[:separator]).html_safe
    end
Renders elements from given page

 == Examples:

 === Render only certain elements:

   <header>
     <%= render_elements only: ['header', 'claim'] %>
   </header>
   <section id="content">
     <%= render_elements except: ['header', 'claim'] %>
   </section>

 === Render elements from global page:

   <footer>
     <%= render_elements from_page: 'footer' %>
   </footer>

 === Fallback to elements from global page:

 You can use the fallback option as an override for elements that are stored on another page.
 So you can take elements from a global page and only if the user adds an element on current page the
 local one gets rendered.

 1. You have to pass the the name of the element the fallback is for as <tt>for</tt> key.
 2. You have to pass a <tt>page_layout</tt> name or {Alchemy::Page} from where the fallback elements is taken from as <tt>from</tt> key.
 3. You can pass the name of element to fallback with as <tt>with</tt> key. This is optional (the element name from the <tt>for</tt> key is taken as default).

   <%= render_elements(fallback: {
     for: 'contact_teaser',
     from: 'sidebar',
     with: 'contact_teaser'
   }) %>

 === Custom elements finder:

 Having a custom element finder class:

   class MyCustomNewsArchive
     def elements(page:)
       news_page.elements.available.named('news').order(created_at: :desc)
     end

     private

     def news_page
       Alchemy::Page.where(page_layout: 'news-archive')
     end
   end

 In your view:

   <div class="news-archive">
     <%= render_elements finder: MyCustomNewsArchive.new %>
   </div>

 @option options [Alchemy::Page|String] :from_page (@page)
   The page the elements are rendered from. You can pass a page_layout String or a {Alchemy::Page} object.
 @option options [Array<String>|String] :only
   A list of element names only to be rendered.
 @option options [Array<String>|String] :except
   A list of element names not to be rendered.
 @option options [Number] :count
   The amount of elements to be rendered (begins with first element found)
 @option options [Number] :offset
   The offset to begin loading elements from
 @option options [Hash] :fallback
   Define elements that are rendered from another page.
 @option options [Boolean] :random (false)
   Randomize the output of elements
 @option options [Boolean] :reverse (false)
   Reverse the rendering order
 @option options [String] :separator
   A string that will be used to join the element partials.
 @option options [Class] :finder (Alchemy::ElementsFinder)
   A class instance that will return elements that get rendered.
   Use this for your custom element loading logic in views.