Page 1 of 1

Help for display the Files(1) similar to Comments (0)

PostPosted: 02 Jan 2019, 10:26
by 03016t0904
Hi Comments(0) shows the number of comments present.
I need help in displaying Files(1) currently it shows as Files.

if(param('enableCommentsForApartments', 1)){
if(!isset($comment)){
$comment = null;
}

$items[Yii::t('module_comments','Comments').' ('.Comment::countForModel('Apartment', $data->id).')'] = array(
'content' => $this->renderPartial('//modules/apartments/views/_tab_comments', array(
'model' => $data,
), true),
'id' => 'tab_5',
);
}

if(isset($data->apDocuments) && count($data->apDocuments)){
$items[tc('Documents')] = array(
'content' => $this->renderPartial('//modules/apartments/views/__table_documents_view', array(
'apartment' => $data,
), true),
'id' => 'tab_8',
);
}

Thanks
Karthik