Documentation Archive

Developer

Apple TV Markup Language Reference

On This Page

descriptiveAlertTemplate

Use the descriptive alert template (descriptiveAlertTemplate) to display a significant amount of important information, such as a Terms of Service page. A title is displayed at the top of the screen with a large text area directly below it. An area containing buttons is located along the bottom of the screen. Figure 5-1 shows the basic layout for a descriptiveAlertTemplate page. The theme for the descriptive alert template defaults to the system preference.

Figure 5-1Descriptive alert image: ../Art/ATV_temps_descriptive_2x.png

Main Elements of the Descriptive Alert Template

Listing 5-1 shows the main elements in TVML format, and Table 5-1 describes the main elements.

Listing 5-1descriptiveAlert TVML format
  1. <descriptiveAlertTemplate>
  2. <background>
  3. </background>
  4. <title>Title</title>
  5. <img />
  6. <description>Description</description>
  7. <row>
  8. <button>
  9. </button>
  10. </row>
  11. </descriptiveAlertTemplate>

Table 5-1descriptiveAlertTemplate element descriptions

Element name

Description

background

Background elements, such as audio.

button

A button for the alert. A button typically lets the user dismiss the alert or bring up a new template page.

description

The main text for the alert.

img

An image associated with the alert box.

row

A row of buttons.

title

The title for the alert page.

Descriptive Alert Template Example

Listing 5-2 shows the TVML for a descriptiveAlertTemplate example. Figure 5-2 shows the output for the example.

Listing 5-2descriptiveAlert example TVML
  1. <document>
  2. <descriptiveAlertTemplate>
  3. <title>Terms of Service</title>
  4. <description>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</description>
  5. <row>
  6. <button>
  7. <text>Accept</text>
  8. </button>
  9. <button>
  10. <text>Decline</text>
  11. </button>
  12. </row>
  13. </descriptiveAlertTemplate>
  14. </document>
Figure 5-2descriptiveAlert template example output image: ../Art/descriptiveAlertTemplateSS_2x.png