def root_elements(yield_name = 'main')
      # my own elements
      ret = elements.where('container_id IS NULL and page_yield_name = ?', yield_name.to_s).order('position ASC')
      # sibling shared elements
      unless siblings.empty?
        ret += Humpyard::Element.where('container_id IS NULL and page_id in (?) and page_yield_name = ? and shared_state = ?', siblings, yield_name.to_s, Humpyard::Element::SHARED_STATES[:shared_on_siblings]).order('position ASC')
      end
      # ancestors shared elements
      unless ancestor_pages.empty?
        ret += Humpyard::Element.where('container_id IS NULL and page_id in (?) and page_yield_name = ? and shared_state = ?', ancestor_pages, yield_name.to_s, Humpyard::Element::SHARED_STATES[:shared_on_children]).order('position ASC')
      end
      ret
    end
def root_elements(yield_name = 'main')
      # my own elements
      ret = elements.where('container_id IS NULL and page_yield_name = ?', yield_name.to_s).order('position ASC')
      # sibling shared elements
      unless siblings.empty?
        ret += Humpyard::Element.where('container_id IS NULL and page_id in (?) and page_yield_name = ? and shared_state = ?', siblings, yield_name.to_s, Humpyard::Element::SHARED_STATES[:shared_on_siblings]).order('position ASC')
      end
      # ancestors shared elements
      unless ancestor_pages.empty?
        ret += Humpyard::Element.where('container_id IS NULL and page_id in (?) and page_yield_name = ? and shared_state = ?', ancestor_pages, yield_name.to_s, Humpyard::Element::SHARED_STATES[:shared_on_children]).order('position ASC')
      end
      ret
    end
Return the elements on a yield container. Includes shared elemenents from siblings or parents