module Yoolk
  module Liquid
    class InstantWebsite::PagesDrop < ::Liquid::Rails::CollectionDrop
      def primary
        @primary ||= self.class.new(objects.take(6))
      end

      def more
        @more ||= self.class.new(objects.drop(6))
      end

      def more?
        more.select do |m|
          m.context = @context
          m.show?
        end.present?
      end
    end
  end
end
module Yoolk
  module Liquid
    class InstantWebsite::PagesDrop < ::Liquid::Rails::CollectionDrop

      def primary
        @primary ||= viewable_pages.take(6)
      end

      def more
        @more ||= viewable_pages.drop(6)
      end

      def more?
        more.present?
      end

      private
      def viewable_pages
        self.class.new(objects).select do |page|
          page.context = @context
          page.show?
        end
      end
    end
  end
end
Hide menu MORE if instant website pages is less than 6 items
enh(pages): Hide menu MORE if instant website pages is less than 6 items

close #88
