2010-06-21 15:46:17 +00:00
|
|
|
module Locomotive
|
|
|
|
module Liquid
|
|
|
|
module Drops
|
|
|
|
class Page < Base
|
|
|
|
|
2010-07-16 20:36:07 +00:00
|
|
|
# liquid_attributes << :title << :slug
|
|
|
|
|
|
|
|
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
|
2010-06-21 15:46:17 +00:00
|
|
|
|
|
|
|
def children
|
|
|
|
@children ||= liquify(*@source.children)
|
|
|
|
end
|
|
|
|
|
2010-06-24 09:14:08 +00:00
|
|
|
def fullpath
|
|
|
|
@fullpath ||= @source.fullpath
|
|
|
|
end
|
|
|
|
|
2010-06-21 15:46:17 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|