Dev Guide
Dev GuideUser GuidesLegal TermsGitHubDevCommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

LiquidExtension

OCP App SDK / LiquidExtension

LiquidExtension

Defines the interface of a liquid extension, which allows an app to expose custom functionality into the content
rendering pipeline.

Index

Constructors

Methods

Constructors

constructor()

Signature

new LiquidExtension(): LiquidExtension;

Returns

LiquidExtension

Methods

perform()

Performs the liquid extension.

Async

Signature

Abstract perform(context: LiquidExtensionContext, input: LiquidExtensionInput): Promise<LiquidExtensionResult>;

Parameters

NameTypeDescription
contextLiquidExtensionContextof the liquid call
inputLiquidExtensionInputany input data provided by the liquid template

Returns

Promise<LiquidExtensionResult>

either successful output (via success) or an error message
(via error)

Defined in: src/app/LiquidExtension.ts:34