Hi, i use the same view in three sections of my site, but each section needs to make some changes in view, eg.
<?php
$this->breadcrumbs=array(
Yii::t('news','Create new'),
);
?>
<?php $form=$this->beginWidget('CActiveForm', array(
'htmlOptions'=>array('enctype'=>'multipart/form-data'),
));?>
<div class="row">
<?php echo $form->labelEx($model,'title'); ?>
<?php echo $form->textField($model,'title',array('size'=>50,'maxlength'=>150)); ?>
<?php echo $form->error($model,'title'); ?>
</div>
<div class="row buttons">
<?php echo CHtml::submitButton($model->isNewRecord ? Yii::t('news','Create') : Yii::t('news','Save')); ?>
</div>
<?php $this->endWidget(); ?>
In another section i need:
<?php
$this->breadcrumbs=array(
Yii::t('news','Create new'),
);
?>
<?php $form=$this->beginWidget('CActiveForm', array(
'htmlOptions'=>array('enctype'=>'multipart/form-data'),
));?>
<div class="row">
<?php echo $form->labelEx($model,'title'); ?>
<?php echo $form->textField($model,'title',array('size'=>50,'maxlength'=>150)); ?>
<?php echo $form->error($model,'title'); ?>
</div>
<div class="row">
<?php echo $form->checkBox($model, 'permissions'); ?>
</div>
<div class="row buttons">
<?php echo CHtml::submitButton($model->isNewRecord ? Yii::t('news','Create') : Yii::t('news','Save')); ?>
</div>
<?php $this->endWidget(); ?>
I do not want to repeat the same view in each section, is there anything similar to beginContent for this?
Thanks.