Page::getField($name)

Version 4

Get certain field of page

Return the Field -object. If field does not exist, returns Empty -object.

Return value

Object Field

Arguments

$name
Technical name of the field

Full documentation

Show order date of an order:

$Date = $Order->getField('order_date');

Field can also be accessed by property:

$Date = $Order->order_date;

Reference -fieldname is marked with two underscore: referenceTableName__referenceFieldName. Show the order number of the last order that is assigned to customer:

$lastOrderDate = $Customer->order__customer->order_date;