Yii DataView Latte Help

DataField

The dataField tag represents a DataField. It is used within the detailView tag.

Parameters

The dataField tag has the same parameters as DataField, and they are specified in the same way, i.e. in order and/or as named parameters, and accept the same types.

Usage

Use as many DataFields as needed within the DetailView.

{varType array|object $data} {detailView $data} {dataField 'id'} {dataField 'username'} {dataField 'email'} {dataField label: 'Created At', value: fn($context) => date('Y-m-d', $context->data->created_at)} {/detailView}
Last modified: 19 September 2025