user104808
user104808

Reputation:

Partials in Liquid

We're trying to rewrite our current views from ERb to Liquid and we got following problem: we have a lot of render(:partial => '/path/to/partial') in our code, but we found absolutely no instructions how to render partials in Liquid. The only one solution we found was with help of render_to_string but it's just too ugly to be true.

Upvotes: 5

Views: 3240

Answers (1)

Ian Terrell
Ian Terrell

Reputation: 10866

The Liquid way is to use the include tag: http://liquid.rubyforge.org/classes/Liquid/Include.html

(I know that documentation isn't very helpful. Here's a post that shows an example usage: http://forums.shopify.com/categories/2/posts/1629)

Upvotes: 3

Related Questions