31 lines
677 B
Ruby
31 lines
677 B
Ruby
module Locomotive
|
|
module Liquid
|
|
module Drops
|
|
class Page < Base
|
|
delegate :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
|
|
|
|
def fullpath
|
|
@fullpath ||= self._source.fullpath
|
|
end
|
|
|
|
def depth
|
|
self._source.depth
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|