Skip to main content

XpmLiquidPropertiesDrop.liquidMethodMissing() method

Resolves a missing property and performs nested substitutions.

Signature

liquidMethodMissing(key: string, context: Context): Promise<any>;

Parameters

Parameter

Type

Description

key

string

The property name requested by the template.

context

Context

The Liquid rendering context.

Returns

Promise<any>

The resolved property value.

Exceptions

XpmInputError If the property is not defined.

Remarks

Called by the Liquid engine when a property is accessed that doesn't exist as a regular method. This implements the Drop pattern for dynamic property resolution.

Resolution process:

  1. Validate the property exists, throw XpmInputError if not.
  2. Retrieve the property value (string, array, or object).
  3. If object, return as-is for Liquid to access nested properties.
  4. If array, join elements into a single string for processing.
  5. If the value contains Liquid syntax, recursively render it with the current context to resolve nested references.
  6. Return the final resolved value.

Array values are concatenated without separators, allowing properties to span multiple lines in JSON while producing a single string output.


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