Can you explain Template Merge Fields?

 

"Template Merge Fields" allow you to piece together certain information for item detail pages based on already-known item data.  This allows you to provide useful and unique data for those pages without having to assign each item's custom fields individually.

The merge fields can be configured from the site settings under Products > Display.

For a full breakdown of this tool, please see the file attached at the end of this article.

Merge Field Settings

If the field data is defined (using one of the supported custom fields) then the defined data always supersedes the field templates.

"Item Detail Meta Description Template" will be used as the meta description for the item detail page of items you haven't specifically assigned a meta description to in the Web_Meta_Desc custom field in P21.

"Item Page Headline Template" will be used as the page headline for the item detail page of items you haven't specifically assigned a page headline to in the Web_Headline custom field in P21.

"Item Page Title Template" will be used as the page title for the item detail page of items you haven't specifically assigned a page title to in the Web_Title custom field in P21.

Merge Fields

Templates may contain any combination of the fields from the Properties list on the right-hand side of the screen.

The system will check each section from top to bottom.  If any of the fields listed in a section do not contain data, the system will move to the next section.  When it finds a section where all fields listed contain data, it will use that section to generate the appropriate item meta data.

Note that for merge fields, the full field name, including the brackets '[ ]' must be included.

Merge Example:

[supplier] - [supplier_part_no], [part_no] - [short_desc] - [company_name]

For the merge template shown above, the system will insert the following :

Supplier Name (or Supplier Override Name if applicable), a dash, followed by the Supplier Part Number, followed by a comma.  Then Item Part Number followed by a dash, then the short description, then a dash, followed by the company name.

On the website, the merge fields are replaced with the actual data for the item in question.