create a liquid drop for site (include a method to get the home page)
This commit is contained in:
parent
d632a5363c
commit
a03b631a71
@ -75,7 +75,7 @@ class Page
|
|||||||
self.cache_strategy != 'none'
|
self.cache_strategy != 'none'
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_liquid(options = {})
|
def to_liquid
|
||||||
Locomotive::Liquid::Drops::Page.new(self)
|
Locomotive::Liquid::Drops::Page.new(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -57,6 +57,10 @@ class Site
|
|||||||
((self.domains || []) + ["#{self.subdomain}.#{Locomotive.config.default_domain}"]).uniq
|
((self.domains || []) + ["#{self.subdomain}.#{Locomotive.config.default_domain}"]).uniq
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def to_liquid
|
||||||
|
Locomotive::Liquid::Drops::Site.new(self)
|
||||||
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def domains_must_be_valid_and_unique
|
def domains_must_be_valid_and_unique
|
||||||
|
@ -3,8 +3,6 @@ module Locomotive
|
|||||||
module Drops
|
module Drops
|
||||||
class Page < Base
|
class Page < Base
|
||||||
|
|
||||||
# liquid_attributes << :title << :slug
|
|
||||||
|
|
||||||
def title
|
def title
|
||||||
@source.templatized? ? @context['content_instance'].highlighted_field_value : @source.title
|
@source.templatized? ? @context['content_instance'].highlighted_field_value : @source.title
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user