Posts Tagged with ternary operators

Displaying 1-1 of 1 result.
Resolved: Yii 1.1 CDetailView visibility, check condition if else
posted by admin on March 6, 2016
I have CDetailView, and I want to check some condition and if condition is true, allow row output, else hide row from detailview table

<?php
$this->widget('zii.widgets.CDetailView', array(
'data' => $model,
'attributes' => array(
'id',
'username',
'balance',
'pro',
'email_delivery:boolean',
array(
'label' => Yii::t('translation', 'About'),
'type' => 'raw',
'value' => $model->about,
),
),
));
?>


How to write condition to about?Read more