engine/lib/locomotive/liquid/drops/page.rb

25 lines
512 B
Ruby
Raw Normal View History

module Locomotive
module Liquid
module Drops
class Page < Base
def title
@source.templatized? ? @context['content_instance'].highlighted_field_value : @source.title
end
def slug
@source.templatized? ? @source.content_type.slug.singularize : @source.slug
end
def children
@children ||= liquify(*@source.children)
end
2010-06-24 09:14:08 +00:00
def fullpath
@fullpath ||= @source.fullpath
end
end
end
end
end