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_menuThe 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
- Duplicate your theme for testing.
- Open the selected menu’s Developer integration section.
- Copy Inside your menu loop and the relevant per-field examples.
- Adapt the lookup inside the theme’s existing
menu.linksloop. Preserve the theme’s existing navigation markup and accessibility behaviour. - Repeat the lookup in the theme’s child-link rendering where needed; a top-level loop does not render nested items automatically.
- 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
| Value | How to use it |
|---|---|
| Text, number, choice, URL or colour | Read the field from entry.data and format it for its output context |
| Multi-line text | Escape text and render line breaks if needed |
| True or false | Test it in a Liquid condition |
| List | Loop over the values instead of printing the whole list |
| File | Read its url; supply your own alternative text and dimensions |
| Metaobject reference | Resolve 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.