Menu templates

Manage templates that define how menus are rendered on the storefront and template variables that take values per item.

The Menu templates screen is where you manage templates that define how store menus are rendered on the storefront and the variables of these templates. When a menu is published, its items are processed through the selected template, producing the output used by the storefront. Variables allow you to assign values per item to the template; these values are entered on the Store menus screen, in the Template values tab for each item. This screen is typically used by teams designing the storefront and structuring the menus.

Accessing the screen

Follow the path CMS – Headless Content › Storefront › Menu templates in the left menu. If you do not see it in the menu, your account does not have permission for this screen.

The selected template is stored in the screen URL; sharing the URL opens the same template selected for the recipient. Bookmarks saved to the old PIM menu templates URL also open this screen.

Screen sections

  1. Page title Menu templates, subtitle Templates and variables defining how the menu is rendered on the storefront. Top right New template button.
  2. Two cards; side by side on wide screens, stacked on narrow screens:
    • Menu templates card — list of all templates.
    • Template variables card — variables of the selected template and Add button.

When you first open the page (if no template is selected in the URL), the first template in the list is selected.

List

Menu templates card

Column Meaning
Menu name The name of the template. Clicking the name selects the template and shows its variables in the right card; the selected template’s name is underlined.
Live Green Yes or gray No. Inactive templates still appear in the Menu template selection list on the Store menus screen.
Actions Pencil icon Edit button.

If there are no templates, it shows No records found and No template defined yet.

Template variables card

Column Meaning
Variable name The name of the variable used in the template, in monospace font.
Variable type Text or ImageSelector.
Actions Pencil icon Edit and trash can icon Delete.

If no template is defined (so no initial selection), it shows Pick a template on the left and Variables belong to the selected template. If the selected template has no variables, it shows This template has no variable.

Actions

Adding a new template

  1. Click the New template button at the top right.
  2. Fill in the fields in the window.
  3. Click Save.

If successful, the window closes, a Template saved. notification appears, and the list refreshes. If saving fails, a red Something went wrong notification appears and the window remains open. The Menu name field must not be empty (spaces only count as empty) for Save to be enabled.

Field Required Description / rule
Menu name Yes The name of the template; this name appears when selecting a template on the Store menus screen. Leading and trailing spaces are trimmed.
Template No The template text. Below the field is the hint Items are rendered through this template on publish. It is a wide, monospace text area.
Live No Checked by default for new templates.

Editing a template

  1. Click the pencil icon (Edit) on the template’s row. The window title shows the template name.
  2. Modify Menu name, Template, and Live fields.
  3. Click Save. To cancel, click Cancel or close the window.

The storefront output of the menu is generated at publish time. After changing a template, republish menus using this template from the Store menus screen; otherwise, the storefront will continue showing the old output.

Adding a variable

  1. Select the template in the Menu templates card by clicking its name.
  2. Click the Add button in the Template variables card. This button is disabled if no templates exist or templates are loading.
  3. In the New variable window, fill in Variable name and Variable type.
  4. Click Save.

If successful, the window closes, a Variable saved. notification appears, and the variable is added to the selected template’s list. Variables are always added to the currently selected template; verify the correct template is selected before adding (its name is underlined).

Field Required Description / rule
Variable name Yes The variable’s name. Save is disabled if empty; leading and trailing spaces are trimmed.
Variable type Yes Text or ImageSelector. Defaults to Text for new variables.

Below the window is the note Values are entered per menu item on the menu items screen.: you define the variable here, and enter each item’s value on the Store menus › Menu items page in the Template values tab when editing the item.

Editing a variable

Click the pencil icon on the variable’s row, change the name or type, and click Save. The window title shows the variable name.

Deleting a variable

Click the trash can icon (Delete) on the variable’s row. No confirmation is asked; the variable is deleted immediately and a Variable deleted. notification appears. Deletion cannot be undone from the screen.

Before deleting a variable, check whether it is still used in the template text or menu items.

Deleting a template

There is no template deletion on this screen. You can mark unused templates by unchecking Live.

Common situations

Add button in the variables card is disabled. No template is selected; this usually happens if no templates are defined. Create a template first using New template.

Red "Something went wrong" notification appeared. Saving or deleting failed; the reason is shown below the notification. The save window remains open so you do not lose your input; fix the issue and try again.

I want to see variables of another template. Click the template name in the list on the left. The right card refreshes to show variables of the selected template.

I changed the template but the menu looks the same on the storefront. Menu output is generated at publish time. Click Publish for each menu using this template on the Store menus screen.

I cannot select a variable on the menu item. The variable list on the item page shows variables of the template selected for the menu. Verify the menu is linked to the correct template and the variable is defined in that template.

The screen shows "PIM service not configured." or "Something went wrong." Templates failed to load. Click Retry on error; if the problem persists or you see a configuration warning, contact your system administrator.

Related screens