1 模版中传递变量

// From page or layout PHP code section
$this['result'] = 'Hello world!';

2 组件中传递变量

// From a component class
$this->page['result'] = 'Hello world!';

3 后台传递变量

// From a backend controller or widget
$this->vars['result'] = 'Hello world!';
遇到问题?