VT Steve
VT Steve

Reputation: 11

Shopify Liquid Modifier order

If I add multiple modifiers in Shopify Liquid, what order does the code get processed in?

For example:

tag_parts.last | capitalize | replace: "-", " "

Would it: Capitalize and then replace the hyphen or Replace the hyphen and then capitalize

I have looked quite a bit, but haven't found a definitive answer.

Upvotes: 0

Views: 151

Answers (1)

drip
drip

Reputation: 12943

The order is from left to right.

So in your case they will be capitalized then replaced.

Upvotes: 1

Related Questions