Liam
Liam

Reputation: 20950

How to output the current line number in a Liquid template?

In Shopify Liquid Templates, for debugging purposes, is it possible to output the current line number of the template file? (similar to the __LINE__ variable in PHP)

Upvotes: 0

Views: 439

Answers (1)

David Lazar
David Lazar

Reputation: 11427

No. Shopify compiles all Liquid into a single huge HTML string which it then dumps out to browsers.

You can always use HTML comments in your liquid to debug... they work fine.

Upvotes: 1

Related Questions