Sha256: 9ccf8fc9899957d3313503dc927670cc1d77755672539870aea03e8f5709a4bd

Contents?: true

Size: 588 Bytes

Versions: 15

Compression:

Stored size: 588 Bytes

Contents

module Locomotive
  module Wagon
    module Liquid
      module Tags
        class Extends < ::Liquid::Extends

          def parse_parent_template
            mounting_point = @options[:mounting_point]

            page = if @template_name == 'parent'
              @options[:page].parent
            else
              mounting_point.pages[@template_name]
            end

            ::Liquid::Template.parse(page.source, { mounting_point: mounting_point, page: page })
          end

        end

        ::Liquid::Template.register_tag('extends', Extends)
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
locomotivecms_wagon-1.5.8 lib/locomotive/wagon/liquid/tags/extends.rb
locomotivecms_wagon-1.5.7 lib/locomotive/wagon/liquid/tags/extends.rb
locomotivecms_wagon-1.5.6 lib/locomotive/wagon/liquid/tags/extends.rb
locomotivecms_wagon-1.5.5 lib/locomotive/wagon/liquid/tags/extends.rb
locomotivecms_wagon-1.5.4 lib/locomotive/wagon/liquid/tags/extends.rb
locomotivecms_wagon-1.5.3 lib/locomotive/wagon/liquid/tags/extends.rb
locomotivecms_wagon-1.5.2 lib/locomotive/wagon/liquid/tags/extends.rb
locomotivecms_wagon-1.5.1 lib/locomotive/wagon/liquid/tags/extends.rb
locomotivecms_wagon-1.5.0 lib/locomotive/wagon/liquid/tags/extends.rb
locomotivecms_wagon-1.5.0.rc1 lib/locomotive/wagon/liquid/tags/extends.rb
locomotivecms_wagon-1.4.0 lib/locomotive/wagon/liquid/tags/extends.rb
locomotivecms_wagon-1.3.3 lib/locomotive/wagon/liquid/tags/extends.rb
locomotivecms_wagon-1.3.2 lib/locomotive/wagon/liquid/tags/extends.rb
locomotivecms_wagon-1.3.1 lib/locomotive/wagon/liquid/tags/extends.rb
locomotivecms_wagon-1.3.0 lib/locomotive/wagon/liquid/tags/extends.rb