Tutorials

How to use folded articles

Sometimes the layout is better suited for folded articles. Perhaps the feed contains mainly short articles and a full native article would occupy too much space. In this case a folded article is a good alternative, where the body of the article is hidden until the visitor clicks.

setup.js
adk.config()
    .addTemplate('com.advisible.native.article', adk.template.config()
        .url('native/article.html'))

    .addContainer('native-scroll', adk.container.config()
        .provider('adk.placement')
        .params({
            adapters: {
                'com.advisible.native.article': {
                    fold: {
                        fadeColor: [255, 252, 237],
                        fadeHeight: 100,
                        text: 'Read more',
                    },
                },
            },
        }))

    .apply()
    .init(publisherId)
Result