Sha256: 13e1ba80c3777ac9b11db96f43090a00c51d40b21a766aead59ba0e585c09eaa

Contents?: true

Size: 764 Bytes

Versions: 4

Compression:

Stored size: 764 Bytes

Contents

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

          delegate :title, :slug, :fullpath, :parent, :depth, :seo_title, :redirect_url, :meta_description, :meta_keywords,
                   :templatized?, :published?, :redirect?, :listed?, :handle, 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 content_type
            ProxyCollection.new(_source.content_type) if _source.content_type
          end

          def breadcrumbs
            # TODO
            ''
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
locomotivecms_wagon-1.3.0 lib/locomotive/wagon/liquid/drops/page.rb
locomotivecms_wagon-1.2.2 lib/locomotive/wagon/liquid/drops/page.rb
locomotivecms_wagon-1.2.1 lib/locomotive/wagon/liquid/drops/page.rb
locomotivecms_wagon-1.2.0 lib/locomotive/wagon/liquid/drops/page.rb