Skip to Content
G-Sixty Studios

Liquid integration

Read published custom-field values in your theme.

Appearance settings render through the app embed. Custom fields need a theme integration. Open Custom fields → Developer integration in the selected menu for snippets generated from its handle and field definitions.

Use the generated menu reference

MenuFields publishes a separate Shopify shop metafield for each menu. For a menu with handle main-menu, the generated reference is:

shop.metafields.menu_fields.menufields_main_menu

The generator lowercases the handle, replaces characters other than letters, numbers and underscores with underscores, prefixes menufields_, and limits the key to 64 characters. Copy the reference from the app rather than guessing it for a renamed or unusual menu handle.

Read the metafield’s .value, look up the link in byUrl, then read the custom field from entry.data.

Integrate with the existing navigation loop

  1. Duplicate your theme for testing.
  2. Open the selected menu’s Developer integration section.
  3. Copy Inside your menu loop and the relevant per-field examples.
  4. Adapt the lookup inside the theme’s existing menu.links loop. Preserve the theme’s existing navigation markup and accessibility behaviour.
  5. Repeat the lookup in the theme’s child-link rendering where needed; a top-level loop does not render nested items automatically.
  6. Publish the menu, preview the theme and check every field type you use.

The app also generates a lookup for a selected item’s exact URL. Without a selected item, its page-level example uses request.path. That path will not identify an entry whose key includes a query string, fragment or different absolute URL. Prefer the exact generated reference or the link’s matching URL.

Reading each value

ValueHow to use it
Text, number, choice, URL or colourRead the field from entry.data and format it for its output context
Multi-line textEscape text and render line breaks if needed
True or falseTest it in a Liquid condition
ListLoop over the values instead of printing the whole list
FileRead its url; supply your own alternative text and dimensions
Metaobject referenceResolve the stored type and handle through metaobjects, then read the entry’s real field keys

Escape merchant-controlled text and attribute values in your theme. Keep confidential data out of fields intended for storefront publication.

Shared URLs and appearance data

Custom fields still use URL-based lookup. Two links sharing a destination cannot carry independent URL-based custom-field values; resolve the ambiguity before publishing.

The newer byItem representation supports automatic appearance for distinct labels sharing a URL. It is not a replacement custom-field lookup API. The storefront’s internal appearance manifests and shards are also separate from the per-menu custom-field reference.

Older examples

Do not use link.metafields.menu_fields or the old global shop.metafields.menu_fields.structured example from the website. The current app generates per-menu shop metafield references. If a field returns blank, check the reference, exact URL, field key and publication status first.

On this page