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

31 lines
689 B
Ruby
Raw Normal View History

module Locomotive
module Liquid
module Drops
class Page < Base
2011-06-23 12:57:52 +00:00
delegate :seo_title, :meta_keywords, :meta_description, :to => "_source"
def title
self._source.templatized? ? @context['content_instance'].highlighted_field_value : self._source.title
end
def slug
self._source.templatized? ? self._source.content_type.slug.singularize : self._source.slug
end
def children
@children ||= liquify(*self._source.children)
end
2010-06-24 09:14:08 +00:00
def fullpath
@fullpath ||= self._source.fullpath
2010-06-24 09:14:08 +00:00
end
def depth
self._source.depth
end
end
end
end
end