rendering ...

macro (directive in module tri )

Description

Used to provide HTML manipulation and insertion. Used for tempolates and to disable sections of code.

The raw HTML passes through a modification cycle where the alter and other standard $word$ strings are replaced with new values just before the final insertion.

Note that the new HTML can itself contain macro directives. That is, the macro directive is recursive.

The value <img-defer ...> are replaced by <img ...>. This defers the loading of the images until the template is actually used. It also defers loading until the template is positioned under the correct base URL. Refer to Template Load Process

The alter param consists of a repeated group of pairs. Refer to tri.applyAlters for the format.

Usage

<macro fetch='template-name.html' alter='fromstr/tostr;....' col='' mode='' marker='' obj='' objref=''></macro>

Parameters

Example

Source





Demo