Answer the question
In order to leave comments, you need to log in
How to process tags and img in Yii in CDetailView?
Good afternoon!
There is this piece of code:
$this->widget('zii.widgets.CDetailView', array(
'data'=>$model,
'attributes'=>array(
'DESCRIPTION',
'PHOTO'=>array(
'name'=>'PHOTO',
// по данному адресу у меня лежат картинки и в обычных представлениях они отображаются
'value'=>Yii::app()->baseUrl.'/images/forum/'.$model->CODE.'/'.$model->photo->NAME,
)
),
));
<p>
Фооооооооооооооооорууууууууууууууууууууууууууууууууум !!!!!!!!!!!! </p>
CHtml::image
done through. By the way - can you tell me how to correctly enter this tag into the image attribute?
Answer the question
In order to leave comments, you need to log in
Set the type property. For html - html, for image - image. To display value as is - raw.
'value'=>CHtml::image(Yii::app()->baseUrl.'/images/forum/'.$model->CODE.'/'.$model->photo->NAME), ?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question