Localized slot

This schema snippet shows how to create a localized slot that can contain the tutorial banner and tutorial carousel for each of the locales supported on your hub.

Pre-requisites

You will need to have registered the tutorial banner and tutorial carousel schemas in order to add content those content types to this slot.

You must have at least one locale added to your hub.

How to use

If you don't want to use the tutorial banner and tutorial carousel with this slot, you can update the contentTypes array to include your own content types. The content property in this schema contains a single banner or carousel, but if you want to be able to add multiple items to the slot, you can change it to an array.

Localized slot example

{  
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schema-examples.com/localized-slot",
  "title": "Localized slot",
  "description": "A slot that can contain a tutorial banner or carousel for each locale",
  "allOf": [{
        "$ref": "http://bigcontent.io/cms/schema/v1/core#/definitions/content"
    }],
   "type":"object",
   "properties":{  
      "content":{  
         "allOf":[  
            {  
               "$ref":"http://bigcontent.io/cms/schema/v1/core#/definitions/localized-value"
            },
            {  
               "properties":{  
                  "values":{  
                     "items":{  
                        "properties":{  
                           "value":{  
                              "title":"Localized Content",
                              "type":"object",
                              "allOf":[  
                                 {  
                                    "$ref":"http://bigcontent.io/cms/schema/v1/core#/definitions/content-link"
                                 },
                                 {  
                                    "properties":{  
                                       "contentType":{  
                                          "title":"Slot Content",
                                          "enum":[  
                                             "https://schema-examples.com/tutorial-banner",
                                             "https://schema-examples.com/tutorial-carousel"
                                          ]
                                       }
                                    }
                                 }
                              ]
                           }
                        }
                     }
                  }
               }
            }
         ]
      }
   }
}

Content form preview

An example of creating a slot item using a slot type registered from the localized slot schema is shown in the image below. When you create a slot in the Content Library, you'll add some dummy content. In the image below a carousel has been added to the slot in the en-GB locale and banners for the fr-FR and de-DE locales. The locales available will depend on which locales you have added to your hub.

Creating a slot from the localized slot type
Creating a slot from the localized slot type

The image below shows a localized slot added to an edition and containing content for each locale.

Adding the localized slot to an edition with content for each locale
Adding the localized slot to an edition with content for each locale

Creating a localizable content type

Localization overview

results matching ""

    No results matching ""