How to assign all vendor symbols to one section?

Topic summary

A developer is working on a Shopify vendor listing page that organizes vendors alphabetically with letter-based navigation sections. They want to group all vendors starting with numbers or symbols into a single “#” section, rather than creating separate sections for each.

Current Implementation:

  • Code loops through shop vendors and creates sections based on first character
  • Generates navigation links for each unique starting letter
  • Displays vendors in a multi-column grid layout

Challenge:
The existing logic creates individual sections for each numeric/symbol character. The developer needs to modify the code to detect non-alphabetic starting characters and assign them all to one unified “#” section.

Code Context:
The implementation uses Liquid templating with vendor filtering, letter extraction via slice: 0, 1, and dynamic section generation. The code includes column distribution logic and vendor grouping.

Status: The question remains unanswered with no solutions or suggestions provided yet.

Summarized with AI on November 20. AI used: claude-sonnet-4-5-20250929.

hello I want to assign all vendors that start with a number or symbol to the section #?:

{% for item in search.results %}

{{ item.content | highlight: search.terms }}
{% endfor %}

{% assign letters = "" %} {% for vendor in shop.vendors %} {% capture vendorLetter %} {{ vendor | slice: 0, 1 }} {% endcapture %} {% unless letters contains vendorLetter %} {% assign letters = letters | append: vendorLetter %} {% endunless %} {% endfor %} {% assign letters = letters | split: '' %} {% for letter in letters %} {{ letter }} {% endfor %}

{% assign totalCols = 2 %}
{% assign totalItems = shop.vendors | size %}
{% assign remainingItems = totalItems %}
{% assign itemsPerColumn = remainingItems | divided_by: totalCols | ceil %}

{% assign current = "" %} {% assign vendorsCount = 0 %} {% assign columnItems = itemsPerColumn %}

{% for vendor in shop.vendors %}
{% capture vendorLetter %}
{{ vendor | slice: 0, 1 }}
{% endcapture %}

{% if vendorLetter != current %}
{% if vendorsCount > 0 %}

{% endif %}

{% if columnItems == 0 %}
{% if forloop.index < totalCols %}

{% endif %} {% assign columnItems = itemsPerColumn %} {% endif %}
{{ vendorLetter }}
{% assign vendorsCount = 0 %} {% endif %}

{% assign current = vendorLetter %}
{% assign vendorsCount = vendorsCount | plus: 1 %}
{% assign remainingItems = remainingItems | minus: 1 %}
{% assign columnItems = columnItems | minus: 1 %}

{% if remainingItems == 0 %}
{% break %}
{% endif %}
{% endfor %}

{% if vendorsCount > 0 %}

{% endif %}
Now display: [https://prnt.sc/Wi7uCz4RpROH](https://prnt.sc/Wi7uCz4RpROH) I want display like this: [https://prnt.sc/ZztpVjzhoqj3](https://prnt.sc/ZztpVjzhoqj3)