render - 0.9.5

render

Tag Name render
Version 0.9.5

Description

The render tag can be used to render a liquid snippet from your theme inside the current template.

Examples

If your theme contains a snippet called “shared/page_header” you can insert it into your current template using render.

{% render "shared/page_header" %}
... content of the "shared/page_header" snippet ...

You can also pass values into the snippet either as text:

{% render "shared/page_header", title: "My Fancy Page Title" %}
<h1>My Fancy Page Title</h1>

Or as a variable:

{% render "shared/page_header", title: current_page.title %}
<h1>Page Title</h1>

Back to Tag List

Back to Liquid Reference for 0.9.5

 

 
Back to Documentation