Sha256: 3605532d7af32f8080b1a199adff8afbc953b923e638ddfe681c2a0c37f92ba4

Contents?: true

Size: 590 Bytes

Versions: 8

Compression:

Stored size: 590 Bytes

Contents

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

          def parse_parent_template
            mounting_point = @context[:mounting_point]

            page = if @template_name == 'parent'
              @context[: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

8 entries across 8 versions & 1 rubygems

Version Path
locomotivecms_builder-1.0.0.alpha8 lib/locomotive/builder/liquid/tags/extends.rb
locomotivecms_builder-1.0.0.alpha7 lib/locomotive/builder/liquid/tags/extends.rb
locomotivecms_builder-1.0.0.alpha6 lib/locomotive/builder/liquid/tags/extends.rb
locomotivecms_builder-1.0.0.alpha5 lib/locomotive/builder/liquid/tags/extends.rb
locomotivecms_builder-1.0.0.alpha4 lib/locomotive/builder/liquid/tags/extends.rb
locomotivecms_builder-1.0.0.alpha3 lib/locomotive/builder/liquid/tags/extends.rb
locomotivecms_builder-1.0.0.alpha2 lib/locomotive/builder/liquid/tags/extends.rb
locomotivecms_builder-1.0.0.alpha1 lib/locomotive/builder/liquid/tags/extends.rb