Liquid Programming Annoyances (and Workarounds)

A few little gotchas in Liquid (Shopify’s theming language) and some ways to work around them – conditionals with “contains,” type casting, variable scope in loops.

Multi-Dimensional and Associative Arrays in Shopify Liquid

You think if you can just find the right spot in the documentation, you can figure out multi-dimensional arrays in Liquid. Actually, you can’t. There is no way to create them. But this clever(?) but cumbersome workaround will get the job done.

Syntax Highlighting for Liquid

A simple “brush” for Syntax Highlighter Evolved which will not only add syntax highlighting for Liquid, it will also let you simply and easily add a Liquid code block in Gutenberg in Wordpress. Handy if you are going to blog about Liquid or Shopify.

Shopify Breadcrumbs based on Menu Structure

Shopify breadcrumbs can be hard because there’s no way to organize them by default and Shopify has no way to establish a parent-child relationship between collections. But you can use your menu structure to create just such a relationship to build intelligent breadcrumbs. Here’s how!