creative designer

Shopify Linklists are built with a specific purpose in mind - to organize lists of links for menus. That's the boring use. Linklists are pretty powerful things for a theme developer to make use of.

The better use: Repeatable Fields. Shopify Theme Settings lack a repeatable field option, which is essentially a way to add more options on demand. Need only one field today - ok. Need 100 tomorrow - that's cool too. When used well a linklist can supercharge Theme Settings to allow a client to expand without needing to hire a dev to add a couple more options. 

The real bonuses to using linklists is:

  1. Easy for a store owner to add and remove fields
  2. Super easy to re-order (when order is important)
  3. They contain 2 fields for the price of one. 

Now you might be reading this ramble wondering what possible use would there be. Here's one simple example that tends to be needed a lot: slideshows / carousels. If you look at most themes there'll at least be an option in there somewhere for an image carousel. Being a Theme Setting you're stuck with a certain number of images, and the order in which they appear. For simplicity look at this:

It's not hard to figure out how to add a third (or more). Want to change the order, just drag the links around.


Interface: The dashboard interface is not really setup to use linklists in this way so the input fields they show are pretty small. That can make it a bit of a pain to enter long content. That sort of thing doesn't slow me down that much as I've got a little script that turns the normal linklist fields into something crazy like this:

No CSS/JS use. We sadly can't make use of linklists in css files, or JavaScript files. If we could linklists would be freakin amazing things and would really allow for some extensible theme dev - all for the benefit of the store own. Not having this is a real shame, but with luck that will change. No doubt adding linklist access would create some performance concerns, especially as you'd want to get access to the {% for %} loops as well. But one can dream right?


Like to work with me?

Let's talk