Skip to content

Ingredient index

Set up the Ingredient index, an A to Z list where each name opens a card with what it does and the products that contain it.

Updated

The Ingredient index lists your ingredients from A to Z, grouped by first letter. Each name opens a card with what the ingredient does, up to four products that contain it, and a link to a page about it if you set one.

Before you start

The section works from the block text alone. To have products appear on the cards, fill these product metafields, created under Settings > Custom data > Products:

  • custom.key_ingredients: list of single line text
  • custom.ingredients: multi-line text with the full ingredient list

Details are in Product data. The section uses no metaobjects or tags.

Add the section

  1. In the theme editor, open the page and select Add section, then choose Ingredient index.
  2. Set Heading (default "Ingredients, A to Z") and Text.
  3. Add an Ingredient block for each ingredient.
  4. On each block, set Ingredient name, What it does and optionally Page about this ingredient.
  5. Set Space above and below and Color scheme.

Adding it from the section list gives you four examples: Glycerin, Grape seed oil, Niacinamide and Squalane.

Section settings

LabelWhat it does
HeadingDefault "Ingredients, A to Z".
TextRich text under the heading.
Space above and belowNone, Small, Medium or Large. Default Small.
Color schemeDefault scheme-label.

Ingredient block settings

LabelWhat it does
Ingredient nameThe name shown, and the text used to find products. Default "Niacinamide".
What it doesA few words, for example: holds water in the skin. Default "Evens tone".
Page about this ingredientA page linked from the card as Read more. Leave empty to link to a search.

How the order and groups work

The section builds one group for each first letter among your block names and sorts the letters. The letter is the first character of the name, so keep names consistent. Order inside a group follows the order of the blocks.

How products are found

For each ingredient, the theme looks through the first 50 products in the store's All collection. It matches the ingredient name, in lowercase, against custom.key_ingredients and custom.ingredients. It shows up to four matches. A percentage in the name, as in "Niacinamide 5%", is dropped before matching, so write the name the way the metafields do.

When a name is plain text

If no product matches and the block has no What it does text and no page, the name appears as plain text instead of a button.

Still stuck? Get theme support