Sha256: a364a0f0d9f2015ee75a3e725ecc8cc6cdf32b925a8fea878691bbe6b02181d7

Contents?: true

Size: 821 Bytes

Versions: 9

Compression:

Stored size: 821 Bytes

Contents

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

          private

          def parse_parent_template
            parent = options[:parent_finder].find(options[:page], @template_name)

            # no need to go further if the parent does not exist
            raise PageNotFound.new("Extending a missing page. Page/Layout with fullpath '#{@template_name}' was not found") if parent.nil?

            ActiveSupport::Notifications.instrument('steam.parse.extends', page: options[:page], parent: parent)

            # the source has already been parsed before
            options[:parser]._parse(parent, options.merge(page: parent))
          end

        end

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
locomotivecms_steam-1.0.0.rc6 lib/locomotive/steam/liquid/tags/extends.rb
locomotivecms_steam-1.0.0.rc4 lib/locomotive/steam/liquid/tags/extends.rb
locomotivecms_steam-1.0.0.rc3 lib/locomotive/steam/liquid/tags/extends.rb
locomotivecms_steam-1.0.0.rc2 lib/locomotive/steam/liquid/tags/extends.rb
locomotivecms_steam-1.0.0.rc1 lib/locomotive/steam/liquid/tags/extends.rb
locomotivecms_steam-1.0.0.pre.beta.3 lib/locomotive/steam/liquid/tags/extends.rb
locomotivecms_steam-1.0.0.pre.beta.2 lib/locomotive/steam/liquid/tags/extends.rb
locomotivecms_steam-1.0.0.pre.beta.1 lib/locomotive/steam/liquid/tags/extends.rb
locomotivecms_steam-1.0.0.pre.alpha.3 lib/locomotive/steam/liquid/tags/extends.rb