Sha256: fe44ccfbb8c0b1b9cbccf6585a3dc832c89d1f15ad83603caab7eb31ebb095c5
Contents?: true
Size: 813 Bytes
Versions: 6
Compression:
Stored size: 813 Bytes
Contents
module Locomotive module Steam module Liquid module Tags class GlobalSection < Locomotive::Steam::Liquid::Tags::Section def parse(tokens) notify_on_parsing(section_type, source: :site, id: "site-#{section_type}", key: section_type, placement: raw_attributes[:placement]&.to_sym ) end private def find_section_content(context) context['site']&.sections_content&.fetch(section_type, nil) end def set_section_dom_id(context) context['section_id'] = "site-#{section_type}" end end ::Liquid::Template.register_tag('global_section'.freeze, GlobalSection) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems