Sha256: a3547cd4ed756567b1e02787e2736090d72d9c12b230efad6cdf6b77dd1d505c

Contents?: true

Size: 544 Bytes

Versions: 20

Compression:

Stored size: 544 Bytes

Contents

module Smithy
  module TemplatesHelper
    include Smithy::Liquid::Rendering

    def render_smithy_nav(options="")
      context = ::Liquid::Context.new({}, smithy_default_assigns, smithy_default_registers, false)
      ::Liquid::Template.parse("{% nav #{options} %}").render(liquid_context)
    end

    def render_smithy_partial(partial_name)
      partial_template = Smithy::Template.partials.find_by_name(partial_name)
      return if partial_template.blank?
      partial_template.liquid_template.render(liquid_context)
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
smithycms-0.8.1 app/helpers/smithy/templates_helper.rb
smithycms-0.7.3 app/helpers/smithy/templates_helper.rb
smithycms-0.7.2 app/helpers/smithy/templates_helper.rb
smithycms-0.7.1 app/helpers/smithy/templates_helper.rb
smithycms-0.7.0 app/helpers/smithy/templates_helper.rb
smithycms-0.6.10 app/helpers/smithy/templates_helper.rb
smithycms-0.5.99.3 app/helpers/smithy/templates_helper.rb
smithycms-0.6.9 app/helpers/smithy/templates_helper.rb
smithycms-0.6.7 app/helpers/smithy/templates_helper.rb
smithycms-0.6.6 app/helpers/smithy/templates_helper.rb
smithycms-0.6.5 app/helpers/smithy/templates_helper.rb
smithycms-0.6.4 app/helpers/smithy/templates_helper.rb
smithycms-0.6.3 app/helpers/smithy/templates_helper.rb
smithycms-0.5.99.2 app/helpers/smithy/templates_helper.rb
smithycms-0.5.99.1 app/helpers/smithy/templates_helper.rb
smithycms-0.5.99 app/helpers/smithy/templates_helper.rb
smithycms-0.6.2 app/helpers/smithy/templates_helper.rb
smithycms-0.6.1 app/helpers/smithy/templates_helper.rb
smithycms-0.5.2 app/helpers/smithy/templates_helper.rb
smithycms-0.6.0 app/helpers/smithy/templates_helper.rb