Multiple delivery keys example
This schema snippet shows how you can define multiple delivery keys in your content form. This allows you to add delivery keys that can be mapped to locales and used to manage URLs for localized versions of website pages. These URLs could be used to build the hreflang
element in the shoes website page to improve the website SEO for different languages and regions.
You can find out more about multiple delivery keys in the Delivery key developer guide.
Pre-requisitesLink copied!
You must have our next generation Delivery API enabled on your hub to use delivery keys.
How to useLink copied!
Add one or more delivery keys to list in the meta
field. In this example we have set a minimum of 4 delivery keys, but this can be modified to meet your requirements.
The delivery keys array is not a localized field, so you will need to use a naming convention to identify the locale a delivery key represents. Adding the locale at the start of the key, for example fr/hommes/chaussures
is one way of mapping the delivery key to its locale.
The example also includes a localized string field that is used to add a title to each delivery key.
Multiple delivery keys exampleLink copied!
Content form previewLink copied!
An example of creating a content item using a content type registered from the multiple delivery keys schema is shown in the image below.