render - Liquid Tag Reference - 0.11.3
Tag Name | render |
Version | 0.11.3 |
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>
Or as a theme translation key:
```liquid
{%- render "shared/page_header", heading: "t.auth.confirmations.pending.heading", sub_heading: "t.auth.confirmations.pending.check_your_email" %}
<h1>Thank you</h1>
<h2>Please check your email</h2>
Back to Liquid Reference for 0.11.3
Back to Documentation