## 代码模板 目录 - 首页 - 编辑/创建页 - Ajax 模态框 ### 首页 示例一 ``` title = '代码模板'; $this->params['breadcrumbs'][] = ['label' => $this->title, 'url' => ['index']]; ?>

title; ?>

``` 示例二 ```
``` ### 编辑/创建页 ``` title = '编辑'; $this->params['breadcrumbs'][] = ['label' => '首页', 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => $this->title]; ?>

基本信息

[ 'template' => "
{label}
{input}{hint}{error}
", ] ]); ?>
``` ### Ajax 模态框 ``` $model->formName(), 'enableAjaxValidation' => true, 'validationUrl' => Url::to(['ajax-edit', 'id' => $model['id']]), 'fieldConfig' => [ 'template' => "
{label}
{input}\n{hint}\n{error}
", ] ]); ?> ```