create a liquid drop for site (include a method to get the home page)

This commit is contained in:
dinedine 2010-07-22 02:18:14 +02:00
parent d632a5363c
commit a03b631a71
4 changed files with 66 additions and 64 deletions

View File

@ -75,7 +75,7 @@ class Page
self.cache_strategy != 'none'
end
def to_liquid(options = {})
def to_liquid
Locomotive::Liquid::Drops::Page.new(self)
end

View File

@ -57,6 +57,10 @@ class Site
((self.domains || []) + ["#{self.subdomain}.#{Locomotive.config.default_domain}"]).uniq
end
def to_liquid
Locomotive::Liquid::Drops::Site.new(self)
end
protected
def domains_must_be_valid_and_unique

View File

@ -3,8 +3,6 @@ module Locomotive
module Drops
class Page < Base
# liquid_attributes << :title << :slug
def title
@source.templatized? ? @context['content_instance'].highlighted_field_value : @source.title
end