engine/lib/locomotive/liquid/drops/page.rb
AJ Schuster f65cd0b2fc Allows for page- and content instance-specific metadata.
Falls back to site metadata when not specified.
2011-04-29 16:10:13 -04:00

31 lines
637 B
Ruby

module Locomotive
module Liquid
module Drops
class Page < Base
delegate :meta_keywords, :meta_description, :to => "@source"
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
def fullpath
@fullpath ||= @source.fullpath
end
def depth
@source.depth
end
end
end
end
end