Skip to main content

XpmLiquidPropertiesDrop class

Liquid drop that resolves property values for template substitutions.

Signature

export declare class XpmLiquidPropertiesDrop extends Drop

Extends: Drop

Remarks

This drop exposes properties to the Liquid engine and performs additional substitutions when a property value itself contains Liquid syntax.

Implements the Liquid Drop pattern to provide lazy property resolution and recursive template evaluation. When a template accesses properties.foo, the Liquid engine calls XpmLiquidPropertiesDrop.liquidMethodMissing() which:

  1. Looks up the property value in the properties map.
  2. Checks if the value contains Liquid syntax ({{ or {%).
  3. If yes, recursively evaluates the value as a Liquid template.
  4. Returns the final resolved value.

This enables multi-level property references where one property can reference another, which can reference yet another, with the engine automatically resolving the entire chain.

Constructors

Constructor

Modifiers

Description

(constructor)({ log, engine, properties, })

Constructs a properties drop.

Properties

Property

Modifiers

Type

Description

_engine

protected

Liquid

The Liquid engine used to render nested substitutions.

_log

protected

Logger

The logger instance for output and diagnostics.

_properties

protected

XpmLiquidSubstitutionsStrings

The properties map used for substitutions.

Methods

Method

Modifiers

Description

liquidMethodMissing(key, context)

Resolves a missing property and performs nested substitutions.


Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.