What is the proper way to link to liquid code in a Custom Liquid block? Using Dawn theme.

nicklocicero
Shopify Partner
26 1 12

I am making my own variant picker for when I have too many options. How can I link to a file with liquid code instead of hardcoding?

Here's is an example:

  1. I added a Custom Liquid block.
    quickflow_0-1634417780157.png
  2. In the template, I have the custom liquid. 
    "5117a0c0-257f-4320-8e63-a0c39e9518e8": {
            "type": "custom_liquid",

            "settings": {
                    "custom_liquid": "how can I link a snippet or code file instead of hardcoded liquid?"
            }
    },

Replies 3 (3)

para0123
Tourist
5 0 6

This is a huge pain point for me. Such a shame, that with such amazing git support, custom code is reduced to a zero-maintainable one-line concat string. That too in a JSON file!

RetroShirtsMan
Excursionist
22 1 8

Have you found a solution meanwhile?

para0123
Tourist
5 0 6

No, not yet @RetroShirtsMan

@nicklocicero - did you have any luck with this?