A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.amazon.com/docs/custom-skills/display-template-reference.html below:

Display Template Reference | Alexa Skills Kit

Display Template Reference Warning:

The Display interface is deprecated and isn't supported on all Alexa devices. To add multimodal experiences to your skill, use Alexa Presentation Language (APL) instead.

To learn about APL, see Add Visuals and Audio to Your Skill.

The Alexa Design System for APL includes a set of templates that are similar to the display templates, so you can transition your skill. For details about which templates to use, see Replace display templates with responsive templates.

This reference describes specific information about display templates that you may want to include in your skill responses that create screen displays for your Alexa skill. For a reference to the Display interface directives and requests, see Display Interface Reference.

The body templates and list templates are designed to support a wide range of presentations. The following behavior applies across templates:

The images shown below may not be to scale, and may not exactly represent what you see on the device.

When titles are displayed, they typically appear as headers, which are either left-aligned or center-aligned, depending on the template or the device.

BodyTemplate1 for simple text and image views

To use APL instead of this deprecated display template (recommended)

Create an APL document and use one of the following APL responsive templates:

For details, see Replace display templates with responsive templates.

BodyTemplate1 syntax
{
  "type":"BodyTemplate1",
  "token": "string",
  "backButton": "VISIBLE"(default) | "HIDDEN",
  "backgroundImage": Image,
  "title": "string",
  "textContent": TextContent
}
BodyTemplate1 guidelines BodyTemplate1 device differences

Echo Show and Fire TV Cube

Echo Spot

Device display comparison–BodyTemplate1

Skills as displayed on Echo Show and Echo Spot

BodyTemplate1 on Echo Show BodyTemplate1 on Echo Show

Wireframe representations for BodyTemplate1

Fire TV Cube

Echo Show

Echo Spot

BodyTemplate2 for image views and limited centered text

To use APL instead of this deprecated display template (recommended)

Create an APL document and use the AlexaDetail responsive template to display text along with a foreground image.

For details, see Replace display templates with responsive templates.

BodyTemplate2 syntax
{
  "type": "BodyTemplate2",
  "token": "string",
  "backButton": "VISIBLE"(default) | "HIDDEN",
  "backgroundImage": "Image",
  "title": "string",
  "image": Image,
  "textContent": TextContent
}
BodyTemplate2 guidelines Display characteristics Echo Show and Fire TV Cube Echo Spot Device display comparison–BodyTemplate2

Skills as displayed on Echo Show and Echo Spot

BodyTemplate2 on Echo Show BodyTemplate2 on Echo Spot

Wireframe representations of BodyTemplate2

Fire TV Cube

Echo Show

Echo Spot

BodyTemplate3 for image views and limited left-aligned text

To use APL instead of this deprecated display template (recommended)

Create an APL document and use the AlexaDetail responsive template to display text along with a foreground image.

For details, see Replace display templates with responsive templates.

BodyTemplate3 syntax
{
  "type": "BodyTemplate3",
  "token": "string",
  "backButton": "VISIBLE"(default) | "HIDDEN",
  "backgroundImage": "Image",
  "title": "string",
  "image": Image,
  "textContent": TextContent
}
BodyTemplate3 guidelines Display characteristics Echo Show and Fire TV Cube Echo Spot Device display comparison–BodyTemplate3

Skills as displayed on Echo Show and Echo Spot

BodyTemplate3 on Echo Show BodyTemplate3 on Echo Spot

Wireframe representations of BodyTemplate3

Fire TV Cube

Echo Show

Echo Spot

BodyTemplate6 for text and optional background image

To use APL instead of this deprecated display template (recommended)

Create an APL document and use the AlexaHeadline responsive template to display brief text over a background.

For details, see Replace display templates with responsive templates.

Display Characteristics

Echo Show and Fire TV Cube Echo Spot

Guidelines for BodyTemplate6:

BodyTemplate6 syntax
{
  "type": "BodyTemplate6",
  "token": "string",
  "backButton": "VISIBLE"(default) | "HIDDEN",
  "backgroundImage": Image,
  "image": "Image",
  "textContent": TextContent
}
Device display comparison–BodyTemplate6

Skills as displayed on Echo Show and Echo Spot

BodyTemplate6 on Echo Show BodyTemplate6 on Echo Spot

Wireframe representations of BodyTemplate6

Fire TV Cube

Fire TV Cube Body Text

Echo Show

Echo Show Body Text

Echo Spot

Echo Spot Body Text Without Hint BodyTemplate7 for scalable foreground image with optional background image

To use APL instead of this deprecated display template (recommended)

Create an APL document and combine the following responsive components to create a similar look.

For an example, create a new APL document in the authoring tool and select the Image Display Sample.

Display Characteristics

Echo Show and Fire TV Cube Echo Spot

Guidelines for using BodyTemplate7:

BodyTemplate7 syntax
{
  "type": "BodyTemplate7",
  "token": "SampleTemplate_3476",
  "backButton": "VISIBLE",
  "title": "Sample BodyTemplate7",
  "backgroundImage": {
    "contentDescription": "Textured grey background",
    "sources": [
      {
        "url": "https://www.example.com/background-image1.png"
      }
    ]
  },
  "image": {
    "contentDescription": "Mount St. Helens landscape",
    "sources": [
      {
        "url": "https://example.com/resources/card-images/mount-saint-helen-small.png"
      }
    ]
  }
}
Device display comparison–BodyTemplate7

Skills as displayed on Echo Show and Echo Spot

BodyTemplate7 on Echo Show with a full-width foreground image BodyTemplate7 on Echo Spot with a full-width foreground image

If the foreground image is transparent, then the visual effect is different, as shown here.

BodyTemplate7 on Echo Show and Echo Spot with a full-width foreground transparent image

Wireframe representations of BodyTemplate7

Fire TV Cube

Fire TV Cube Header Text

Echo Show

Echo Show Header Text

Echo Spot

Echo Spot Header Text ListTemplate1 for text lists and optional images

To use APL instead of this deprecated display template (recommended)

Create an APL document and use the AlexaTextList responsive template to display a vertical scrolling list of text items. List items can include image thumbnails and multiple fields of information.

For details, see Replace display templates with responsive templates.

Display characteristics

Echo Show and Fire TV Cube Echo Spot

Guidelines for using ListTemplate1:

ListTemplate1 syntax
{
  "type": "ListTemplate1",
  "token": "string",
  "backButton": "VISIBLE"(default) | "HIDDEN",
  "backgroundImage": "Image",
  "title": "string",
  "listItems": [
    {
      "token": "string",
      "image": Image,
      "textContent": TextContent
    },
    ...
    ...
    {
      "token": "string",
      "image": Image,
      "textContent": TextContent
    }
  ]
}
Device display comparison–ListTemplate1 ListTemplate2 for list images and optional text

To use APL instead of this deprecated display template (recommended)

Create an APL document and use the AlexaLists responsive template with listImagePrimacy set to true to display image items in a horizontal list.

For details, see Replace display templates with responsive templates.

Display characteristics

Echo Show and Fire TV Cube Echo Spot

Guidelines for using ListTemplate2:

ListTemplate2 syntax
{
  "type": "ListTemplate2",
  "token": "string",
  "backButton": "VISIBLE"(default) | "HIDDEN",
  "backgroundImage": "Image",
  "title": "string",
  "listItems": [
    {
      "token": "string",
      "image": Image,
      "textContent": TextContent
    },
    ...
    ...
    {
      "token": "string",
      "image": Image,
      "textContent": TextContent
    },
  ]
}
Device display comparison–ListTemplate2 Display template elements

This table lists all of the elements that can be found in a display template, although each template might use only a subset of these elements.

type Name of the template BodyTemplate1
BodyTemplate2
BodyTemplate3
BodyTemplate6
BodyTemplate7
ListTemplate1
ListTemplate2
token Used to track selectable elements in the skill service code. The value can be any user-defined string. Dog-List-2
1212323312
backButton Used to place the back button on a display template. HIDDEN
VISIBLE backgroundImage Used to include a background image on a display template.
{
    "contentDescription": "string",
    "sources": [
      {
        "url": "string",
        "size": "string",
        "widthPixels": integer,
        "heightPixels": integer
      },
      {
        "url": "string",
        "size": "string",
        "widthPixels": integer,
        "heightPixels": integer
      },
      {...}
    ]
}
title Used for title for a display template. The value can be any user-defined string. "Doggie Carousel"
"Cake Recipes Galore" textContent Contains primaryText, secondaryText, and tertiaryText.
{
    "primaryText": ...,
    "secondaryText": ...,
    "tertiaryText": ...
}
primaryText Contains type (which is PlainText or RichText) and text (which is a string). Limit of 8000 characters.
{
    "text": "string",
    "type": "PlainText" | "RichText"
}
secondaryText Contains type (which is PlainText or RichText) and text (which is a string). Limit of 8000 characters.
{
    "text": "string",
    "type": "PlainText" | "RichText"
}
tertiaryText Contains type (which is PlainText or RichText) and text (which is a string). Limit of 8000 characters.
{
    "text": "string",
    "type": "PlainText" | "RichText"
}
image References and describes the image. Multiple sources for the image can be provided. The same format is used for both `backgroundImage` and `image`.
{
    "contentDescription": "string",
    "sources": [
      {
        "url": "string",
        "size": "string",
        "widthPixels": integer,
        "heightPixels": integer
      },
      {
        "url": "string",
        "size": "string",
        "widthPixels": integer,
        "heightPixels": integer
      },
      {...}
    ]
}
listItems Contains the text and images of the list items.
  [
    {
      "token": "string",
      "image": "Image",
      "textContent": "TextContent"
    },
    ...
    ...
    {
      "token": "string",
      "image": "Image",
      "textContent": "TextContent"
    }
  ]
Other resources

For template-related information, see:

To build skills with screen display, see:

Last updated: Nov 28, 2023


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4