Metatags

Topic summary

A developer is struggling to display metaobjects from Shopify using Liquid code. They’re attempting to fetch items from a “Johnson Controls” folder within “Connections” metaobjects, but the objects aren’t rendering on the page despite debug statements.

Key Issues:

  • Metaobjects not displaying correctly
  • Debug output included to verify fetched data
  • Code appears corrupted or improperly formatted in the post

Technical Details:

  • Using shop.metaobjects[connection_name] to access metaobjects
  • Attempting to filter by folder name and iterate through fields
  • Code includes image handling and conditional rendering logic

Current Status:

  • The posted code contains significant formatting errors (reversed/garbled text in latter portions)
  • No responses or solutions provided yet
  • Developer seeking community assistance to resolve the display issue
Summarized with AI on November 7. AI used: claude-sonnet-4-5-20250929.

Hi Shopify Community, Please help

I’m currently working on a project where I need to fetch and display metaobjects from a specific folder in Shopify using Liquid. The folder is named “Johnson Controls” under the “Connections” metaobjects.

Despite my efforts, the metaobjects are not being displayed correctly on the page. I’ve included debug statements to verify the fetched metaobjects, but it still doesn’t seem to work.

Here is the code I’m using

{% assign connection_name = 'connections' %} {% assign folder_name = 'Johnson Controls' %} {% assign metaobjects = shop.metaobjects[connection_name] %}

{% comment %}
Debugging Output: Display all fields of each metaobject
{% endcomment %}

Debug Information

    {% for metaobject in metaobjects %}
  • Name: {{ metaobject.name }}
      {% for field in metaobject %}
    • {{ field[0] }}: {{ field[1] }}
    • {% endfor %}
  • {% endfor %}

{% assign filtered_metaobjects = metaobjects | where: ‘company’, folder_name %}

{% if filtered_metaobjects.size > 0 %}

{% render ‘meta-tags’ %}
{% else %}

No metaobjects found for the specified company.

{% endif %}

{% for metaobject in filtered_metaobjects %}

{% if metaobject.photo.value %} {{ metaobject.name.value }} {% else %}

No photo available for {{ metaobject.name.value }}

{% endif %} {% if metaobject.name.value %}

{{ metaobject.name.value }}

{% endif %} {% if metaobject.job.value %}

{{ metaobject.job.value }}

{% endif %}
{% endfor %}