3.1.3. assignDynamic()

void assignDynamic ( string $name, mixed $callback [, array $args] )

Assigns the valid PHP callback $callback to the dynamic section or tree $name. The optional array $args are the arguments for the function/method. The assigned function or method must return a valid section/tree data.

If the dynamic sections are precompiled (default OPT setting), the callbacks must be set BEFORE the template execution/compilation starts.

Note: this method is not available, if the Dynamic sections were removed from the source with OPT Configurator.