How to show a different set of Collections and Carousel banners depending upon the Customer tag?

Topic summary

A Shopify developer is attempting to display different collections based on customer tags. They have existing code that checks if a customer has a ‘Logged-in’ tag, but want to extend this functionality to show:

  • Collection A for customers tagged with ‘Tag 1’
  • Collection B for customers tagged with ‘Tag 2’

The code snippet provided is from cat_grid_item.liquid and appears corrupted or improperly formatted (contains reversed/garbled text), making it difficult to assess the current implementation.

Key Challenge:
Implementing conditional logic in Liquid to render different collection sets based on multiple customer tag values.

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

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

I have the following code in file cat_grid_item.liquid. I want to know if we can show ‘collection A’ for a customer with ‘Tag 1’ and collection B to a customer with ‘Tag 2’ ?

{% if customer and customer.tags contains 'Logged-in' %}
  {{ 'download-kit.css' | asset_url | stylesheet_tag }}
{%- liquid
  assign collection = collections[block.settings.collection.orthodontic-kits]
  assign image = block.settings.image | default:collection.image
  assign home_t = 'homepage.onboarding.collection_title' | t  | append:' #' | append:for_i
  assign block_title = block.settings.title | default:collection.title | default:home_t -%}

<div id="nt_{{block.id}}" class="cat_grid_item cat_space_item cat_grid_item_{{for_i}} {{ccol}}" {{ block.shopify_attributes }}>
  <div class="cat_grid_item__content pr oh">
    <a href="{{ block.settings.url | default:collection.url }}" class="db cat_grid_item__link"{% if image != blank and Ismaxwh %} style="margin: 0 auto;max-height: {{image.height}}px;max-width: {{image.width}}px"{% endif %}>
      {%- if image != blank -%}
        <div class="cat_grid_item__overlay item__position nt_bg_lz lazyloadt4s {{block.settings.img_align}}" data-bgset="{{ image | img_url: '1x1' }}" data-ratio="{{image.aspect_ratio}}" data-sizes="auto" data-parent-fit="width"{% if cat_grid_item %} style="padding-top:{{ 1 | divided_by: image.aspect_ratio | times: 100}}%;"{% endif %}></div>
      {%- else -%}
        <div class="cat_grid_item__overlay item__position nt_bg_lz lazyloadt4s {{block.settings.img_align}}" data-bg="{{cimg}}"{% if cat_grid_item %} style="padding-top:100%;"{% endif %}></div>
      {%- endif -%}
    </a>
    {%- if block_title != 'hide_title' -%}
    <div class="cat_grid_item__wrapper pe_none">
      <div class="cat_grid_item__title h3">{{ block_title }}</div>
      {%- if pr_txt != blank %}<div class="cat_grid_item__count dn">{{collection.all_products_count}} {{pr_txt}}</div>{% endif -%}
    </div>
    {%- endif -%}
  </div>
</div>
{% endif %}