Calling a linklist with a variable for a 4 level linklist

Topic summary

A developer is building a 4-level navigation hierarchy that exceeds Shopify’s default capabilities. Their approach:

Structure:

  • Primary linklist (list1) contains top-level categories
  • Each item in list1 has a matching handle that corresponds to a secondary linklist
  • Goal: Loop through list1, then dynamically call corresponding linklists using each link’s handle

The Problem:

  • The code works when the linklist handle is hardcoded
  • Fails when passing the handle as a variable (linklists[linklistHandle])
  • Developer confirmed the variable is being passed correctly and all related linklist handles are accurate

Proposed Solution:

  • Another user (justinmeyer) encountered similar indexing issues with the linklists object
  • Suggested workaround: Pass the handle through a downcase filter before using it
  • Example: {% assign listhandle = link.handle | downcase %}
  • This resolved the issue despite handles appearing correct, suggesting a potential Shopify bug with handle matching
Summarized with AI on November 9. AI used: claude-sonnet-4-5-20250929.

I ran into something similar where a handle I knew was correct wasn’t indexing properly into the linklists object. I think there is some sort of bug on shopify’s side because I worked around it by running my handle through the downcase filter. This should obviously do nothing but doing the equivalent of the following:

{% assign listhandle = link.handle | downcase %}:  

fixed the problem for me.