Member Junction
    Preparing search index...

    Class TemplateExtensionBaseAbstract

    Used for extending the functionality of the template engine (Nunjucks). Sub-class this class to create a new template extension.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    tags: string[] = []

    One or more tags that represent case-sensitive tag names that will invoke this extension.

    Accessors

    Methods

    • Required, must implement this method to run the extension.

      IMPORTANT: The actual signature of this method depends on what you pass to nodes.CallExtensionAsync() in your parse() method. The parameters listed here are just placeholders - your actual implementation will have different parameters.

      Common Patterns:

      • CallExtensionAsync(this, 'run', params)run(context, body, callBack)
      • CallExtensionAsync(this, 'run', params, [body])run(context, params, body, callBack)
      • CallExtensionAsync(this, 'run', params, [body, error])run(context, params, body, error, callBack)

      Parameters

      • context: any

        Always the first parameter: Nunjucks rendering context

      • ...args: any[]

      Returns any

      README.md in this directory for detailed documentation on parameter mapping