Class: Yass::LiquidTags::RenderContent
- Inherits:
-
Liquid::Block
- Object
- Liquid::Block
- Yass::LiquidTags::RenderContent
- Defined in:
- lib/yass/liquid_tags.rb
Overview
Works like ‘render`, but passes the block content to the template as a variable named `content`
Instance Method Summary collapse
Instance Method Details
#render(context) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/yass/liquid_tags.rb', line 7 def render(context) context.stack({}) do context["block_content"] = super r = Liquid::Render.parse("render", "#{@markup}, content: block_content", nil, @parse_context) r.render_tag(context, +"") end end |