Tutorials

How to add multiple containers

Containers can be instantiated multiple times. Each container instance will automatically get a unique identifier which can be observed in the ADK Panel. This means that the same container configuration and placement can be used for multiple surfaces on a page while still being able to distinguish between them.

To achieve this, simply add multiple container elements with the same ID in your HTML.

Setup
adk.config()
    .addTemplate('com.advisible.native.teaser', adk.template.config()
        .url('teaser.html'))
    .addContainer('native-teaser', adk.container.config())
HTML
<div data-adk-container="native-teaser"></div>
<div data-adk-container="native-teaser"></div>
Result