use yii\helpers\Url;
use yii\web\JsExpression;
$this->title = Yii::t('app', 'Dynamic content edit');
$this->params['breadcrumbs'][] = ['url' => ['/backend/dynamic-content/index'], 'label' => Yii::t('app', 'Dynamic content')];
$this->params['breadcrumbs'][] = $this->title;
$action = isset($model->id) ? 'edit?id=' . $model->id : 'edit';
$this->registerJs('
     var static_values_properties = ' . Json::encode($static_values_properties) . ';
     var current_selections = ' . (empty($model->apply_if_params) ? "{}" : $model->apply_if_params) . ';
     var current_field_id= "apply_if_params"', \yii\web\View::POS_HEAD, 'propertyData');
\app\backend\assets\PropertyAsset::register($this);
?>


<?php 
echo app\widgets\Alert::widget(['id' => 'alert']);
?>

<?php 
$form = ActiveForm::begin(['id' => 'dynamic-content-form', 'type' => ActiveForm::TYPE_VERTICAL, 'action' => $action]);
?>

<?php 
$this->beginBlock('submit');
echo \app\backend\components\Helper::saveButtons($model);
$this->endBlock();
?>


<section id="widget-grid">
    <div class="row">
示例#2
0
?>
  <div id="wrap">
    <?php 
NavBar::begin(['brandLabel' => Yii::$app->name, 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar navbar-default navbar-fixed-top']]);
if (Yii::$app->user->isGuest) {
    $menuItems[] = ['label' => Yii::t('app', 'Signup'), 'url' => ['/signup']];
    $menuItems[] = ['label' => Yii::t('app', 'Login'), 'url' => ['/login']];
} else {
    $menuItems[] = ['label' => Yii::t('app', 'Logout'), 'url' => ['/logout'], 'linkOptions' => ['data-method' => 'post']];
}
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => $menuItems]);
NavBar::end();
?>
    <div class="container">
      <?php 
echo app\widgets\Alert::widget(['template' => '/shared/alert']);
?>
      <?php 
echo $content;
?>
    </div>
  </div>

  <?php 
echo Html::jsFile('/assets/' . ArrayHelper::getValue(Yii::$app->params['assets'], 'front.js'));
$this->endBody();
?>
</body>
</html>
<?php 
$this->endPage();