Sha256: 7a1eeaad6163e29a94336aeee3deedd1977f3d98b2980ead2e89d8eb0d17b530

Contents?: true

Size: 785 Bytes

Versions: 8

Compression:

Stored size: 785 Bytes

Contents

module Locomotive
  module Builder
    module Liquid
      module Drops
        class Page < Base

          delegate :title, :slug, :fullpath, :parent, :depth, :seo_title, :redirect_url, :meta_description, :meta_keywords, :to => '_source'

          def children
            _children = @_source.children || []
            _children = _children.sort { |a, b| a.position.to_i <=> b.position.to_i }
            @children ||= liquify(*_children)
          end

          def published?
            @_source.published?
          end

          def redirect?
            self._source.redirect?
          end

          def breadcrumbs
            # TODO
            ''
          end

          def listed?
            @_source.listed?
          end

        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
locomotivecms_builder-1.0.0.alpha8 lib/locomotive/builder/liquid/drops/page.rb
locomotivecms_builder-1.0.0.alpha7 lib/locomotive/builder/liquid/drops/page.rb
locomotivecms_builder-1.0.0.alpha6 lib/locomotive/builder/liquid/drops/page.rb
locomotivecms_builder-1.0.0.alpha5 lib/locomotive/builder/liquid/drops/page.rb
locomotivecms_builder-1.0.0.alpha4 lib/locomotive/builder/liquid/drops/page.rb
locomotivecms_builder-1.0.0.alpha3 lib/locomotive/builder/liquid/drops/page.rb
locomotivecms_builder-1.0.0.alpha2 lib/locomotive/builder/liquid/drops/page.rb
locomotivecms_builder-1.0.0.alpha1 lib/locomotive/builder/liquid/drops/page.rb