c.applyMethodCascade (target : xlink, suffixes : string) : string

The method applyMethodCascade allows to create a specific lookup order for templates. In addition to object oriented derivations, this method can also be used to override templates.

The following example extends the method content with three override possibilities A, B and C. These are controlled by the argument suffixes that take a space separated list.

<c.literalCall id="{c.applyMethodCascade(c.xlink('content'), 'A B C')}" />

This example executes a literal call with the determined method. The template system searches the method in the following order:

  • content.A
  • content.B
  • content.C
  • content

The system stops searching once it found a method with the given name.

Hint: The method lookup is very efficient, as long as there are only a few cascade combinations.