XpmLiquidMatrixDrop.liquidMethodMissing() method
Resolves a missing matrix parameter and performs nested substitutions.
Signature
liquidMethodMissing(key: string, context: Context): Promise<any>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
string |
The matrix parameter name requested by the template. |
|
context |
Context |
The Liquid rendering context. |
Returns
Promise<any>
The resolved matrix parameter value.
Exceptions
XpmInputError If the matrix parameter is not defined.
Remarks
Called by the Liquid engine when a matrix parameter is accessed that doesn't exist as a regular method. This implements the Drop pattern for dynamic matrix parameter resolution.
Resolution process:
- Validate the parameter exists, throw
XpmInputErrorif not. - Retrieve the parameter value (string, array, or object).
- If object, return as-is for Liquid to access nested properties.
- If array, join elements into a single string for processing.
- If the value contains Liquid syntax, recursively render it with the current context to resolve nested references.
- Return the final resolved value.
This mirrors the behavior of XpmLiquidPropertiesDrop but operates on matrix parameters instead of properties. Matrix values can reference other substitution variables, enabling complex template expansions.
Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.