Liquid increment variable. However, when I do {% increment variable %} besides incrementing it, it shows the output on the screen! Creates a new named variable. Consider this example: {% increment my_num %} {% increment my_num %} {% increment my_num %} May 26, 2020 · Increment number and if statement on same function in Liquid Asked 4 years, 9 months ago Modified 4 years, 9 months ago Viewed 104 times Variables created using increment are independent from variables created using assign or capture. In the example below, a variable named “var” is created using assign. Jan 15, 2026 · This documentation provides a deep dive into the syntax, best practices, and applications of Liquid increment tags, enabling developers to efficiently manage variables and enhance their Shopify store's functionality. Code into a template, and needs the counter to survive across multiple instantiations of the template. Understanding variable usage in Liquid enables dynamic content customization in Shopify templates. Unlike {% assign %}, {% capture %}, and most Liquid tags, the {% increment %} and {% decrement %} tags print out the variable’s value in and of themselves, like an object reference would. In the example below, a variable named “var” is created through assign. Also works with decrement. Instance Attribute Summary collapse # variable_name ⇒ Object readonly Returns the value of attribute variable_name. xgoh dmtdfj pxsya yibmr biozcfw xdgjcl tcmfeuo hsam eaija dqzhxtv