question

Mark Beauchamp avatar image
Mark Beauchamp asked

How to use Autopage with the APL Paginated List Responsive Template

I'm new to APL so my apologies if I'm missing something which should be obvious. I can demonstrate AutoPage working per the example given here, but can't figure out what I need to do to achieve the same behavior using the AlexaPaginatedList responsive template.

Is what I'm trying to do possible using the responsive templates?

{
    "type": "APL",
    "version": "1.7",
    "import": [
        {
            "name": "alexa-layouts",
            "version": "1.4.0"
        }
    ],
    "mainTemplate": {
        "parameters": [
            "alexaPaginatedListData"
        ],
        "items": [
            {
                "navigation": "none",
                "onMount": [{
                    "type": "AutoPage",
                    "componentId": "testpager",
                    "delay": 1000,
                    "duration": 1000
                }],
                "type": "AlexaPaginatedList",
                "id": "testpager",
                "headerTitle": "AutoPage Test",
                "headerAttributionPrimacy": false,
                "backgroundScale": "best-fill",
                "backgroundAlign": "bottom",
                "theme": "dark",
                "listItems": [
                    {
                        "primaryText": "Home Garden",
                        "imageSource": "https://d2o906d8ln7ui1.cloudfront.net/images/templates_v3/paginatedlist/PaginatedList_Dark1.png"
                    },
                    {
                        "primaryText": "Home Garden",
                        "imageSource": "https://d2o906d8ln7ui1.cloudfront.net/images/templates_v3/paginatedlist/PaginatedList_Dark2.png"
                    },
                    {
                        "primaryText": "Home Garden",
                        "imageSource": "https://d2o906d8ln7ui1.cloudfront.net/images/templates_v3/paginatedlist/PaginatedList_Dark3.png"
                    }
                ]
            }
        ]
    }
} 
apl
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Alexander Martin avatar image
Alexander Martin answered

Hi @Mark Beauchamp,

you only need to change one small thing in your document to make it work. The AlexaPaginatedList component uses the property "listId" instead of "id". I made you a working example here: https://apl.ninja/document/xeladotbe/8sSv0RBcXyeItAFmrBJUqX1E59wy5hG0

Here you can find all properties supported by the AlexaPaginatedList component: https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/apl-alexa-paginated-list-layout.html#alexapaginatedlist-parameters

Regards,

Alex

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Mark Beauchamp avatar image Mark Beauchamp commented ·
Obvious in retrospect :) Thanks so much!
0 Likes 0 ·