Skip to content

Render and include ​

Last updated View as Markdown
  • {% render 'card' with product %} and {% render 'card' for products %} now render the snippet. Inside the snippet, the object has the name of the snippet, or the name you give with as. Before, these forms rendered nothing.
  • In {% render 'card' for products %}, the snippet can read forloop.
  • {% include %} renders a snippet the same way as render, and its snippet name can come from a variable. Before, it did not parse.
  • A snippet can read the variables of its caller, and its own variables are visible after the render tag.

See render and include.

Paginate ​

  • {% paginate collection.products by 24 cod %} now also sets the paginate object, with page_param set to page[cod].

See paginate.