How to inherit settings between containers
When expanding your ad integration to multiple containers, you might notice that many of them share the same settings. Using container inheritance allows you to define common settings once and have them automatically applied to multiple containers, making your setup easier to maintain by reducing duplication.
In this example we set up an abstract base container with common settings and then create a specific container that inherits those settings using the extends container setting.
Setup
adk.config()
.addTemplate('com.advisible.native.teaser', adk.template.config()
.url('/teaser.html'))
.addContainer('ad', adk.container.config()
.abstract()
.lazy()
// add more common settings for the abstract container here
)
.addContainer('native-teaser', adk.container.config()
.extends('ad'))
// add more containers that inherit from 'ad' as needed
Result