Sha256: 54a270d5b5e5be9c765d9404921a81d3ad5382efba30abea05b53bba6fa68aa7

Contents?: true

Size: 588 Bytes

Versions: 3

Compression:

Stored size: 588 Bytes

Contents

module Locomotive
  module Steam
    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

3 entries across 3 versions & 1 rubygems

Version Path
locomotivecms_steam-0.1.2.pre.beta lib/locomotive/steam/liquid/tags/extends.rb
locomotivecms_steam-0.1.1 lib/locomotive/steam/liquid/tags/extends.rb
locomotivecms_steam-0.1.0 lib/locomotive/steam/liquid/tags/extends.rb